Use correct Xinerama APIs for querying version and availability.
Fixes Bugzilla #1314.
This commit is contained in:
parent
034365a830
commit
864b4535a9
2 changed files with 5 additions and 1 deletions
|
@ -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
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue