From f59aa3034c17710daa59ae9b110e7180b61b123a Mon Sep 17 00:00:00 2001 From: Bill Currie Date: Fri, 9 Feb 2001 22:24:44 +0000 Subject: [PATCH] dga_check.c: fix dga checking. just because the dga queries succeed doesn't mean it's actually there. in_x11.c: whitespace --- source/dga_check.c | 6 +++++- source/in_x11.c | 4 ++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/source/dga_check.c b/source/dga_check.c index ef911ad..613cb14 100644 --- a/source/dga_check.c +++ b/source/dga_check.c @@ -79,7 +79,11 @@ VID_CheckDGA (Display * dpy, int *maj_ver, int *min_ver, int *hasvideo) if (!XF86DGAQueryDirectVideo (dpy, DefaultScreen (dpy), &dgafeat)) { *hasvideo = 0; } else { - *hasvideo = (dgafeat & XF86DGADirectPresent); + *hasvideo = (dgafeat & XF86DGADirectGraphics); + } + + if (!(dgafeat & (XF86DGADirectPresent | XF86DGADirectMouse))) { + return false; } return true; diff --git a/source/in_x11.c b/source/in_x11.c index 7092df9..b526081 100644 --- a/source/in_x11.c +++ b/source/in_x11.c @@ -483,8 +483,8 @@ IN_Shutdown (void) XAutoRepeatOn (x_disp); #ifdef HAVE_DGA - if (dga_avail) - XF86DGADirectVideo (x_disp, DefaultScreen (x_disp), 0); + if (dga_avail) + XF86DGADirectVideo (x_disp, DefaultScreen (x_disp), 0); #endif } x11_close_display ();