From 657c346556f18044dac04957ee7894220e86ac8e Mon Sep 17 00:00:00 2001 From: Sam Lantinga Date: Wed, 21 Jun 2023 08:42:38 -0700 Subject: [PATCH] Apply DPI scale to mouse coordinates in SDL_WarpMouseInWindow() Fixes https://github.com/libsdl-org/SDL/issues/7855 --- src/video/windows/SDL_windowsmouse.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/video/windows/SDL_windowsmouse.c b/src/video/windows/SDL_windowsmouse.c index 594396921..5844da79e 100644 --- a/src/video/windows/SDL_windowsmouse.c +++ b/src/video/windows/SDL_windowsmouse.c @@ -288,6 +288,7 @@ static void WIN_WarpMouse(SDL_Window *window, int x, int y) return; } + WIN_ClientPointFromSDL(window, &x, &y); pt.x = x; pt.y = y; ClientToScreen(hwnd, &pt);