diff --git a/src/win32_window.c b/src/win32_window.c index f0e18577..32f8b68c 100644 --- a/src/win32_window.c +++ b/src/win32_window.c @@ -618,12 +618,12 @@ static LRESULT CALLBACK windowProc(HWND hWnd, UINT uMsg, if (window->cursorMode == GLFW_CURSOR_DISABLED) { - if (_glfw.win32.disabledCursorWindow != window) - break; - const int dx = x - window->win32.lastCursorPosX; const int dy = y - window->win32.lastCursorPosY; + if (_glfw.win32.disabledCursorWindow != window) + break; + _glfwInputCursorPos(window, window->virtualCursorPosX + dx, window->virtualCursorPosY + dy);