Use correct Xinerama APIs for querying version and availability.
authorRyan C. Gordon
Mon, 24 Oct 2011 15:33:58 -0400
changeset 602756185b574d61
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
     1.1 --- a/src/video/x11/SDL_x11modes.c	Mon Oct 24 12:07:41 2011 -0400
     1.2 +++ b/src/video/x11/SDL_x11modes.c	Mon Oct 24 15:33:58 2011 -0400
     1.3 @@ -200,6 +200,8 @@
     1.4  static SDL_bool
     1.5  CheckXinerama(Display * display, int *major, int *minor)
     1.6  {
     1.7 +    int event_base = 0;
     1.8 +    int error_base = 0;
     1.9      const char *env;
    1.10  
    1.11      /* Default the extension not available */
    1.12 @@ -216,7 +218,8 @@
    1.13      }
    1.14  
    1.15      /* Query the extension version */
    1.16 -    if (!XineramaQueryExtension(display, major, minor) ||
    1.17 +    if (!XineramaQueryExtension(display, &event_base, &error_base) ||
    1.18 +        !XineramaQueryVersion(display, major, minor) ||
    1.19          !XineramaIsActive(display)) {
    1.20          return SDL_FALSE;
    1.21      }
     2.1 --- a/src/video/x11/SDL_x11sym.h	Mon Oct 24 12:07:41 2011 -0400
     2.2 +++ b/src/video/x11/SDL_x11sym.h	Mon Oct 24 15:33:58 2011 -0400
     2.3 @@ -189,6 +189,7 @@
     2.4  SDL_X11_MODULE(XINERAMA)
     2.5  SDL_X11_SYM(Bool,XineramaIsActive,(Display *a),(a),return)
     2.6  SDL_X11_SYM(Bool,XineramaQueryExtension,(Display *a,int *b,int *c),(a,b,c),return)
     2.7 +SDL_X11_SYM(Status,XineramaQueryVersion,(Display *a,int *b,int *c),(a,b,c),return)
     2.8  SDL_X11_SYM(XineramaScreenInfo*,XineramaQueryScreens,(Display *a, int *b),(a,b),return)
     2.9  #endif
    2.10