mirror of
https://github.com/gwm17/glfw.git
synced 2025-01-30 19:08:51 -05:00
Added filtering of duplicate key releases.
This commit is contained in:
parent
edebf3b560
commit
11b7d17ea0
|
@ -129,6 +129,9 @@ void _glfwInputKey(_GLFWwindow* window, int key, int action, int mods)
|
||||||
if (key < 0 || key > GLFW_KEY_LAST)
|
if (key < 0 || key > GLFW_KEY_LAST)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
if (action == GLFW_RELEASE && window->key[key] == GLFW_RELEASE)
|
||||||
|
return;
|
||||||
|
|
||||||
if (action == GLFW_PRESS && window->key[key] == GLFW_PRESS)
|
if (action == GLFW_PRESS && window->key[key] == GLFW_PRESS)
|
||||||
repeated = GL_TRUE;
|
repeated = GL_TRUE;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user