Browse Source

Update GLFW, fix caps lock detection

tags/v0.6.1
Andrew Belt 6 years ago
parent
commit
3567f1047d
2 changed files with 4 additions and 2 deletions
  1. +1
    -1
      dep/glfw
  2. +3
    -1
      src/window.cpp

+ 1
- 1
dep/glfw

@@ -1 +1 @@
Subproject commit 682f1cf203707f21c2eed4fa3f89c23c52accc49
Subproject commit 617a322bd88c1b27f1fd7d05dc3723b6c5461a68

+ 3
- 1
src/window.cpp View File

@@ -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


Loading…
Cancel
Save