0
0
Fork 0
mirror of https://git.code.sf.net/p/quake/quakeforge-old synced 2025-03-21 16:31:07 +00:00

Made it possible to pass NULL arguments for maj_ver and/or min_ver.

This commit is contained in:
Marcus Sundberg 2000-01-14 22:31:08 +00:00
parent 2004915c6e
commit 9388195afb

View file

@ -48,12 +48,15 @@ int
VID_CheckDGA(Display *dpy, int *maj_ver, int *min_ver, int *hasvideo)
{
#ifdef HAS_DGA
int event_base, error_base, dgafeat;
int event_base, error_base, dgafeat, dummy;
if (! XF86DGAQueryExtension(dpy, &event_base, &error_base)) {
return 0;
}
if (maj_ver == NULL) maj_ver = &dummy;
if (min_ver == NULL) min_ver = &dummy;
if (! XF86DGAQueryVersion(dpy, maj_ver, min_ver)) {
return 0;
}
@ -82,12 +85,15 @@ VID_CheckVMode(Display *dpy, int *maj_ver, int *min_ver, int *num_modes,
#ifdef HAS_DGA
XF86VidModeModeInfo **vidmodes;
int event_base, error_base;
int ret, i;
int ret, dummy, i;
if (! XF86VidModeQueryExtension(dpy, &event_base, &error_base)) {
return 0;
}
if (maj_ver == NULL) maj_ver = &dummy;
if (min_ver == NULL) min_ver = &dummy;
if (! XF86VidModeQueryVersion(dpy, maj_ver, min_ver)) {
return 0;
}