Update SDL_windowswindow.c

This commit is contained in:
expikr
2023-07-05 11:35:20 +08:00
committed by Sam Lantinga
parent ffcd1c0c26
commit d0fdf6207b

View File

@@ -1320,7 +1320,7 @@ void WIN_UpdateClipCursor(SDL_Window *window)
(window->mouse_rect.w > 0 && window->mouse_rect.h > 0)) &&
(window->flags & SDL_WINDOW_INPUT_FOCUS)) {
if (mouse->relative_mode && !mouse->relative_mode_warp && data->mouse_relative_mode_center) {
if (GetWindowRect(data->hwnd, &rect)) {
if (GetClientRect(data->hwnd, &rect)) {
/* WIN_WarpCursor() jitters by +1, and remote desktop warp wobble is +/- 1 */
LONG remote_desktop_adjustment = GetSystemMetrics(SM_REMOTESESSION) ? 2 : 0;
LONG cx, cy;