diff --git a/src/nostalgia/core/glfw/gfx.cpp b/src/nostalgia/core/glfw/gfx.cpp index 791c1d55..c1cf8807 100644 --- a/src/nostalgia/core/glfw/gfx.cpp +++ b/src/nostalgia/core/glfw/gfx.cpp @@ -44,6 +44,7 @@ static void handleKeyPress(Context *ctx, int key, bool down) noexcept { map[GLFW_KEY_RIGHT_CONTROL] = Key::Mod_Ctrl; map[GLFW_KEY_LEFT_SUPER] = Key::Mod_Super; map[GLFW_KEY_RIGHT_SUPER] = Key::Mod_Super; + map[GLFW_KEY_ESCAPE] = Key::Escape; return map; }(); const auto eventHandler = keyEventHandler(ctx); @@ -70,7 +71,7 @@ static void handleGlfwCursorPosEvent(GLFWwindow*, double, double) noexcept { static void handleGlfwMouseButtonEvent(GLFWwindow *window, int, int, int) noexcept { const auto ctx = static_cast(glfwGetWindowUserPointer(window)); - ctx->uninterruptedRefreshes = 10; + ctx->uninterruptedRefreshes = 15; } static void handleGlfwWindowResize(GLFWwindow*, int, int) noexcept { @@ -78,7 +79,7 @@ static void handleGlfwWindowResize(GLFWwindow*, int, int) noexcept { static void handleGlfwKeyEvent(GLFWwindow *window, int key, int, int action, int) noexcept { const auto ctx = static_cast(glfwGetWindowUserPointer(window)); - ctx->uninterruptedRefreshes = 2; + ctx->uninterruptedRefreshes = 15; if (action == GLFW_PRESS) { handleKeyPress(ctx, key, true); } else if (action == GLFW_RELEASE) { diff --git a/src/nostalgia/core/input.hpp b/src/nostalgia/core/input.hpp index 8db7fb17..b28da1f1 100644 --- a/src/nostalgia/core/input.hpp +++ b/src/nostalgia/core/input.hpp @@ -64,6 +64,8 @@ enum Key { Mod_Super, Mod_Shift, + Escape, + End };