浏览代码

Apply DPI scale to mouse coordinates in SDL_WarpMouseInWindow()

Fixes https://github.com/libsdl-org/SDL/issues/7855
Sam Lantinga 2 年之前
父节点
当前提交
657c346556
共有 1 个文件被更改,包括 1 次插入0 次删除
  1. 1 0
      src/video/windows/SDL_windowsmouse.c

+ 1 - 0
src/video/windows/SDL_windowsmouse.c

@@ -288,6 +288,7 @@ static void WIN_WarpMouse(SDL_Window *window, int x, int y)
         return;
         return;
     }
     }
 
 
+    WIN_ClientPointFromSDL(window, &x, &y);
     pt.x = x;
     pt.x = x;
     pt.y = y;
     pt.y = y;
     ClientToScreen(hwnd, &pt);
     ClientToScreen(hwnd, &pt);