|
|
@ -1037,15 +1037,21 @@ void _glfwPlatformPollEvents(void) |
|
|
|
_glfwInputKey(window, GLFW_KEY_RIGHT_SHIFT, 0, GLFW_RELEASE, mods); |
|
|
|
_glfwInputKey(window, GLFW_KEY_RIGHT_SHIFT, 0, GLFW_RELEASE, mods); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// Did the cursor move in an focused window that has disabled the cursor
|
|
|
|
|
|
|
|
if (window->cursorMode == GLFW_CURSOR_DISABLED) |
|
|
|
if (window->cursorMode == GLFW_CURSOR_DISABLED) |
|
|
|
{ |
|
|
|
{ |
|
|
|
int width, height; |
|
|
|
int width, height; |
|
|
|
_glfwPlatformGetWindowSize(window, &width, &height); |
|
|
|
_glfwPlatformGetWindowSize(window, &width, &height); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// NOTE: Re-center the cursor only if it has moved since the last
|
|
|
|
|
|
|
|
// call, to avoid breaking glfwWaitEvents with WM_MOUSEMOVE
|
|
|
|
|
|
|
|
if (window->win32.cursorPosX != width / 2 || |
|
|
|
|
|
|
|
window->win32.cursorPosY != height / 2) |
|
|
|
|
|
|
|
{ |
|
|
|
_glfwPlatformSetCursorPos(window, width / 2, height / 2); |
|
|
|
_glfwPlatformSetCursorPos(window, width / 2, height / 2); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
void _glfwPlatformWaitEvents(void) |
|
|
|
void _glfwPlatformWaitEvents(void) |
|
|
|
{ |
|
|
|
{ |
|
|
|