diff --git a/dep/glfw b/dep/glfw index 682f1cf2..617a322b 160000 --- a/dep/glfw +++ b/dep/glfw @@ -1 +1 @@ -Subproject commit 682f1cf203707f21c2eed4fa3f89c23c52accc49 +Subproject commit 617a322bd88c1b27f1fd7d05dc3723b6c5461a68 diff --git a/src/window.cpp b/src/window.cpp index 26c3ba35..13e1fdb5 100644 --- a/src/window.cpp +++ b/src/window.cpp @@ -264,7 +264,7 @@ void charCallback(GLFWwindow *window, unsigned int codepoint) { void keyCallback(GLFWwindow *window, int key, int scancode, int action, int mods) { // Keyboard MIDI driver - if (glfwGetInputMode(gWindow, GLFW_LOCK_KEY_MODS) & GLFW_MOD_CAPS_LOCK) { + if (mods & GLFW_MOD_CAPS_LOCK) { if (action == GLFW_PRESS) { keyboardPress(key); } @@ -355,6 +355,8 @@ void windowInit() { glfwSwapInterval(1); + glfwSetInputMode(gWindow, GLFW_LOCK_KEY_MODS, 1); + glfwSetWindowSizeCallback(gWindow, windowSizeCallback); glfwSetMouseButtonCallback(gWindow, mouseButtonStickyCallback); // Call this ourselves, but on every frame instead of only when the mouse moves