Use correct Xinerama APIs for querying version and availability.
authorRyan C. Gordon <icculus@icculus.org>
Mon, 24 Oct 2011 15:33:58 -0400
changeset 6027 56185b574d61
parent 6026 a7142857e885
child 6028 869b6723e1fc
Use correct Xinerama APIs for querying version and availability. Fixes Bugzilla #1314.
src/video/x11/SDL_x11modes.c
src/video/x11/SDL_x11sym.h
--- a/src/video/x11/SDL_x11modes.c	Mon Oct 24 12:07:41 2011 -0400
+++ b/src/video/x11/SDL_x11modes.c	Mon Oct 24 15:33:58 2011 -0400
@@ -200,6 +200,8 @@
 static SDL_bool
 CheckXinerama(Display * display, int *major, int *minor)
 {
+    int event_base = 0;
+    int error_base = 0;
     const char *env;
 
     /* Default the extension not available */
@@ -216,7 +218,8 @@
     }
 
     /* Query the extension version */
-    if (!XineramaQueryExtension(display, major, minor) ||
+    if (!XineramaQueryExtension(display, &event_base, &error_base) ||
+        !XineramaQueryVersion(display, major, minor) ||
         !XineramaIsActive(display)) {
         return SDL_FALSE;
     }
--- a/src/video/x11/SDL_x11sym.h	Mon Oct 24 12:07:41 2011 -0400
+++ b/src/video/x11/SDL_x11sym.h	Mon Oct 24 15:33:58 2011 -0400
@@ -189,6 +189,7 @@
 SDL_X11_MODULE(XINERAMA)
 SDL_X11_SYM(Bool,XineramaIsActive,(Display *a),(a),return)
 SDL_X11_SYM(Bool,XineramaQueryExtension,(Display *a,int *b,int *c),(a,b,c),return)
+SDL_X11_SYM(Status,XineramaQueryVersion,(Display *a,int *b,int *c),(a,b,c),return)
 SDL_X11_SYM(XineramaScreenInfo*,XineramaQueryScreens,(Display *a, int *b),(a,b),return)
 #endif