|
|
@ -4134,11 +4134,11 @@ static bool InitGraphicsDevice(int width, int height) |
|
|
|
glfwSetScrollCallback(CORE.Window.handle, MouseScrollCallback); |
|
|
|
glfwSetCursorEnterCallback(CORE.Window.handle, CursorEnterCallback); |
|
|
|
|
|
|
|
glfwSetInputMode(CORE.Window.handle, GLFW_LOCK_KEY_MODS, GLFW_TRUE); // Enable lock keys modifiers (CAPS, NUM) |
|
|
|
|
|
|
|
glfwMakeContextCurrent(CORE.Window.handle); |
|
|
|
|
|
|
|
#if !defined(PLATFORM_WEB) |
|
|
|
glfwSetInputMode(CORE.Window.handle, GLFW_LOCK_KEY_MODS, GLFW_TRUE); // Enable lock keys modifiers (CAPS, NUM) |
|
|
|
|
|
|
|
glfwSwapInterval(0); // No V-Sync by default |
|
|
|
#endif |
|
|
|
|
|
|
@ -5267,9 +5267,11 @@ static void KeyCallback(GLFWwindow *window, int key, int scancode, int action, i |
|
|
|
if (action == GLFW_RELEASE) CORE.Input.Keyboard.currentKeyState[key] = 0; |
|
|
|
else CORE.Input.Keyboard.currentKeyState[key] = 1; |
|
|
|
|
|
|
|
#if !defined(PLATFORM_WEB) |
|
|
|
// WARNING: Check if CAPS/NUM key modifiers are enabled and force down state for those keys |
|
|
|
if (((key == KEY_CAPS_LOCK) && ((mods & GLFW_MOD_CAPS_LOCK) > 0)) || |
|
|
|
((key == KEY_NUM_LOCK) && ((mods & GLFW_MOD_NUM_LOCK) > 0))) CORE.Input.Keyboard.currentKeyState[key] = 1; |
|
|
|
#endif |
|
|
|
|
|
|
|
// Check if there is space available in the key queue |
|
|
|
if ((CORE.Input.Keyboard.keyPressedQueueCount < MAX_KEY_PRESSED_QUEUE) && (action == GLFW_PRESS)) |
|
|
|