From 0123d6311d5c0059d617324426ef7eef8d577d9b Mon Sep 17 00:00:00 2001 From: Lauri Kasanen Date: Sun, 19 Feb 2023 16:04:47 +0200 Subject: [PATCH] Fix GetGlobalMouseState when xi2 is not available at runtime --- src/video/x11/SDL_x11mouse.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/video/x11/SDL_x11mouse.c b/src/video/x11/SDL_x11mouse.c index 44fb571e3..3f67950bb 100644 --- a/src/video/x11/SDL_x11mouse.c +++ b/src/video/x11/SDL_x11mouse.c @@ -415,6 +415,9 @@ static Uint32 X11_GetGlobalMouseState(float *x, float *y) #if !SDL_VIDEO_DRIVER_X11_XINPUT2 videodata->global_mouse_changed = SDL_TRUE; +#else + if (!SDL_X11_HAVE_XINPUT2) + videodata->global_mouse_changed = SDL_TRUE; #endif /* check if we have this cached since XInput last saw the mouse move. */