From 11b7d17ea01416339918b8b3e0a2b5027461860e Mon Sep 17 00:00:00 2001 From: Camilla Berglund Date: Wed, 5 Jun 2013 15:26:52 +0200 Subject: [PATCH] Added filtering of duplicate key releases. --- src/input.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/input.c b/src/input.c index 37c40908..9d31a868 100644 --- a/src/input.c +++ b/src/input.c @@ -129,6 +129,9 @@ void _glfwInputKey(_GLFWwindow* window, int key, int action, int mods) if (key < 0 || key > GLFW_KEY_LAST) return; + if (action == GLFW_RELEASE && window->key[key] == GLFW_RELEASE) + return; + if (action == GLFW_PRESS && window->key[key] == GLFW_PRESS) repeated = GL_TRUE;