From a216bb56ee5877ec21ac22fdf1f7ffcb2fccde87 Mon Sep 17 00:00:00 2001 From: erorcun Date: Wed, 27 Jan 2021 18:26:48 +0300 Subject: Attempt to fix input delays on GLFW --- src/skel/glfw/glfw.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/skel/glfw/glfw.cpp b/src/skel/glfw/glfw.cpp index aab78c6d..97a77827 100644 --- a/src/skel/glfw/glfw.cpp +++ b/src/skel/glfw/glfw.cpp @@ -1448,7 +1448,7 @@ bool rshiftStatus = false; void keypressCB(GLFWwindow* window, int key, int scancode, int action, int mods) { - if (key >= 0 && key <= GLFW_KEY_LAST) { + if (key >= 0 && key <= GLFW_KEY_LAST && action != GLFW_REPEAT) { RsKeyCodes ks = (RsKeyCodes)keymap[key]; if (key == GLFW_KEY_LEFT_SHIFT) @@ -1459,7 +1459,6 @@ keypressCB(GLFWwindow* window, int key, int scancode, int action, int mods) if (action == GLFW_RELEASE) RsKeyboardEventHandler(rsKEYUP, &ks); else if (action == GLFW_PRESS) RsKeyboardEventHandler(rsKEYDOWN, &ks); - else if (action == GLFW_REPEAT) RsKeyboardEventHandler(rsKEYDOWN, &ks); } } -- cgit v1.2.3