Skip to content
This repository has been archived by the owner on Feb 11, 2021. It is now read-only.

Commit

Permalink
Use correct Xinerama APIs for querying version and availability.
Browse files Browse the repository at this point in the history
Fixes Bugzilla #1314.
  • Loading branch information
icculus committed Oct 24, 2011
1 parent c469194 commit 61ab097
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/video/x11/SDL_x11modes.c
Expand Up @@ -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 */
Expand All @@ -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;
}
Expand Down
1 change: 1 addition & 0 deletions src/video/x11/SDL_x11sym.h
Expand Up @@ -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

Expand Down

0 comments on commit 61ab097

Please sign in to comment.