瀏覽代碼

Fix GetGlobalMouseState when xi2 is not available at runtime

Lauri Kasanen 3 年之前
父節點
當前提交
0123d6311d
共有 1 個文件被更改,包括 3 次插入0 次删除
  1. 3 0
      src/video/x11/SDL_x11mouse.c

+ 3 - 0
src/video/x11/SDL_x11mouse.c

@@ -415,6 +415,9 @@ static Uint32 X11_GetGlobalMouseState(float *x, float *y)
 
 
 #if !SDL_VIDEO_DRIVER_X11_XINPUT2
 #if !SDL_VIDEO_DRIVER_X11_XINPUT2
     videodata->global_mouse_changed = SDL_TRUE;
     videodata->global_mouse_changed = SDL_TRUE;
+#else
+    if (!SDL_X11_HAVE_XINPUT2)
+        videodata->global_mouse_changed = SDL_TRUE;
 #endif
 #endif
 
 
     /* check if we have this cached since XInput last saw the mouse move. */
     /* check if we have this cached since XInput last saw the mouse move. */