mirror of
https://git.code.sf.net/p/quake/newtree
synced 2024-11-22 04:01:17 +00:00
Add the use of XQueryExtension() to the DGA and VidMode checks. The game
should no longer crash if the VidMode or DGA extensions are not present at runtime.
This commit is contained in:
parent
9f0035bdf9
commit
2f8f1b39b7
1 changed files with 8 additions and 0 deletions
|
@ -56,6 +56,10 @@ VID_CheckDGA (Display * dpy, int *maj_ver, int *min_ver, int *hasvideo)
|
|||
#ifdef HAVE_DGA
|
||||
int event_base, error_base, dgafeat, dummy;
|
||||
|
||||
if (!XQueryExtension (dpy, "XFree86-DGA", &dummy, &dummy, &dummy)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!XF86DGAQueryExtension (dpy, &event_base, &error_base)) {
|
||||
return false;
|
||||
}
|
||||
|
@ -97,6 +101,10 @@ VID_CheckVMode (Display * dpy, int *maj_ver, int *min_ver)
|
|||
int event_base, error_base;
|
||||
int dummy;
|
||||
|
||||
if (!XQueryExtension (dpy, "XFree86-VidModeExtension", &dummy, &dummy, &dummy)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!XF86VidModeQueryExtension (dpy, &event_base, &error_base)) {
|
||||
return false;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue