소스 검색

Use ScreenCount() instead of SDL_GetNumVideoDisplays()

The limitation appears to be specific to multi-screen setups
Sam Lantinga 3 년 전
부모
커밋
b6cf889af4
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      src/video/x11/SDL_x11mouse.c

+ 1 - 1
src/video/x11/SDL_x11mouse.c

@@ -320,7 +320,7 @@ WarpMouseInternal(Window xwindow, const int x, const int y)
     /* It seems XIWarpPointer() doesn't work correctly on multi-head setups:
     /* It seems XIWarpPointer() doesn't work correctly on multi-head setups:
      * https://developer.blender.org/rB165caafb99c6846e53d11c4e966990aaffc06cea
      * https://developer.blender.org/rB165caafb99c6846e53d11c4e966990aaffc06cea
      */
      */
-    if (SDL_GetNumVideoDisplays() == 1) {
+    if (ScreenCount(display) == 1) {
         X11_XIGetClientPointer(display, None, &deviceid);
         X11_XIGetClientPointer(display, None, &deviceid);
     }
     }
     if (deviceid != 0) {
     if (deviceid != 0) {