Pass scancode with synthetic key release events

This commit is contained in:
Camilla Löwy
2017-01-29 16:18:58 +01:00
parent a2867ff6ea
commit f3e20ca437
3 changed files with 13 additions and 3 deletions
+4 -1
View File
@@ -50,7 +50,10 @@ void _glfwInputWindowFocus(_GLFWwindow* window, GLFWbool focused)
for (key = 0; key <= GLFW_KEY_LAST; key++)
{
if (window->keys[key] == GLFW_PRESS)
_glfwInputKey(window, key, 0, GLFW_RELEASE, 0);
{
const int scancode = _glfwPlatformGetKeyScancode(key);
_glfwInputKey(window, key, scancode, GLFW_RELEASE, 0);
}
}
for (button = 0; button <= GLFW_MOUSE_BUTTON_LAST; button++)