summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorskal <pascal.massimino@gmail.com>2026-01-28 02:07:18 +0100
committerskal <pascal.massimino@gmail.com>2026-01-28 02:07:18 +0100
commit78ec37484b92efee1627e934a6e4e43c74968f88 (patch)
tree27377b871cd1a0a42456a613295e4d3ee14a0774 /src
parent5bbe2204f1d30e99ee442e287167ef14ad51af75 (diff)
feat(platform): Add 'q' key to quit
Adds the 'q' key as an alternative to 'Escape' for closing the application.
Diffstat (limited to 'src')
-rw-r--r--src/platform.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/platform.cc b/src/platform.cc
index fa49b53..b0ec86b 100644
--- a/src/platform.cc
+++ b/src/platform.cc
@@ -10,7 +10,7 @@ static bool g_is_fullscreen = false;
static void glfw_key_callback(GLFWwindow *cb_window, int key, int scancode,
int action, int mods) {
if (action == GLFW_PRESS) {
- if (key == GLFW_KEY_ESCAPE) {
+ if (key == GLFW_KEY_ESCAPE || key == GLFW_KEY_Q) {
glfwSetWindowShouldClose(cb_window, GLFW_TRUE);
} else if (key == GLFW_KEY_F) {
platform_toggle_fullscreen();