浏览代码

wayland: Fix global mouse position retrieval

Frank Praznik 5 月之前
父节点
当前提交
8cb303126f
共有 1 个文件被更改,包括 1 次插入0 次删除
  1. 1 0
      src/video/wayland/SDL_waylandmouse.c

+ 1 - 0
src/video/wayland/SDL_waylandmouse.c

@@ -903,6 +903,7 @@ static SDL_MouseButtonFlags SDLCALL Wayland_GetGlobalMouseState(float *x, float
         int off_x, off_y;
 
         result = viddata->input->buttons_pressed;
+        SDL_GetMouseState(x, y);
         SDL_RelativeToGlobalForWindow(focus, focus->x, focus->y, &off_x, &off_y);
         *x += off_x;
         *y += off_y;