mirror of
https://github.com/libsdl-org/SDL.git
synced 2026-05-31 22:42:52 +08:00
wayland: Fix global mouse position retrieval
This commit is contained in:
@@ -903,6 +903,7 @@ static SDL_MouseButtonFlags SDLCALL Wayland_GetGlobalMouseState(float *x, float
|
|||||||
int off_x, off_y;
|
int off_x, off_y;
|
||||||
|
|
||||||
result = viddata->input->buttons_pressed;
|
result = viddata->input->buttons_pressed;
|
||||||
|
SDL_GetMouseState(x, y);
|
||||||
SDL_RelativeToGlobalForWindow(focus, focus->x, focus->y, &off_x, &off_y);
|
SDL_RelativeToGlobalForWindow(focus, focus->x, focus->y, &off_x, &off_y);
|
||||||
*x += off_x;
|
*x += off_x;
|
||||||
*y += off_y;
|
*y += off_y;
|
||||||
|
|||||||
Reference in New Issue
Block a user