VidMode detection changes.

This commit is contained in:
Jeff Teunissen 2001-02-11 22:17:19 +00:00
parent d828ba64b3
commit 2c703a045e

View file

@ -40,11 +40,7 @@
#endif #endif
#ifdef HAVE_VIDMODE #ifdef HAVE_VIDMODE
# include <X11/extensions/xf86vmode.h> # include <X11/extensions/xf86vmode.h>
# ifdef X_XF86VidModeSetClientVersion # include <X11/extensions/xf86vmstr.h>
# define VIDMODE_VERSION 2
# else
# define VIDMODE_VERSION 0
# endif
#endif #endif
#include "dga_check.h" #include "dga_check.h"
@ -111,7 +107,7 @@ VID_CheckVMode (Display * dpy, int *maj_ver, int *min_ver)
int event_base, error_base; int event_base, error_base;
int dummy, dummy_major, dummy_minor; int dummy, dummy_major, dummy_minor;
if (!XQueryExtension (dpy, "XFree86-VidModeExtension", &dummy, &dummy, &dummy)) { if (!XQueryExtension (dpy, XF86VIDMODENAME, &dummy, &dummy, &dummy)) {
return false; return false;
} }
@ -127,11 +123,12 @@ VID_CheckVMode (Display * dpy, int *maj_ver, int *min_ver)
if (!XF86VidModeQueryVersion (dpy, maj_ver, min_ver)) if (!XF86VidModeQueryVersion (dpy, maj_ver, min_ver))
return false; return false;
if (maj_ver && min_ver) if ((!maj_ver) || (*maj_ver != XVIDMODE_MAJOR_VERSION)) {
printf("VidMode version:%d.%d\n", *maj_ver, *min_ver); Con_Printf ("VID: Incorrect VidMode version: %d.%d, \n", *maj_ver, *min_ver);
if ((!maj_ver) || (*maj_ver != VIDMODE_VERSION))
return false; return false;
}
Con_Printf ("VID: VidMode version: %d.%d, \n", *maj_ver, *min_ver);
return true; return true;
#else #else
return false; return false;