Skip to content
This repository has been archived by the owner. It is now read-only.
Permalink
Browse files

Use correct Xinerama APIs for querying version and availability.

Fixes Bugzilla #1314.
  • Loading branch information
icculus committed Oct 24, 2011
1 parent c469194 commit 61ab097e1b42892285fccfe083fe57a9b7c8cee9
Showing with 5 additions and 1 deletion.
  1. +4 −1 src/video/x11/SDL_x11modes.c
  2. +1 −0 src/video/x11/SDL_x11sym.h
@@ -200,6 +200,8 @@ int vm_event, vm_error = -1;
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 @@ CheckXinerama(Display * display, int *major, int *minor)
}

/* 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;
}
@@ -189,6 +189,7 @@ SDL_X11_SYM(Cursor,XcursorImageLoadCursor,(Display *a,const XcursorImage *b),(a,
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

0 comments on commit 61ab097

Please sign in to comment.