Fix to allow SDL compiled under XFree v4 to work with XFree v3 xservers.
authorSam Lantinga <slouken@lokigames.com>
Sat, 07 Jul 2001 08:08:42 +0000
changeset 90 ee1f71c10889
parent 89 69b8fac3e1c0
child 91 e85e03f195b4
Fix to allow SDL compiled under XFree v4 to work with XFree v3 xservers. Contributed by Jarek Sobieszek
src/video/x11/SDL_x11gamma.c
src/video/x11/SDL_x11modes.c
--- a/src/video/x11/SDL_x11gamma.c	Sat Jul 07 08:03:34 2001 +0000
+++ b/src/video/x11/SDL_x11gamma.c	Sat Jul 07 08:08:42 2001 +0000
@@ -37,7 +37,7 @@
 static int X11_SetGammaNoLock(_THIS, float red, float green, float blue)
 {
 #ifdef XFREE86_VMGAMMA
-    if (use_vidmode) {
+    if (use_vidmode >= 2) {
         XF86VidModeGamma gamma;
         Bool succeeded;
 
@@ -98,7 +98,7 @@
 static int X11_GetGammaNoLock(_THIS, float *red, float *green, float *blue)
 {
 #ifdef XFREE86_VMGAMMA
-    if (use_vidmode) {
+    if (use_vidmode >= 2) {
         XF86VidModeGamma gamma;
         if (XVidMode(GetGamma, (SDL_Display, SDL_Screen, &gamma))) {
             *red   = gamma.red;
--- a/src/video/x11/SDL_x11modes.c	Sat Jul 07 08:03:34 2001 +0000
+++ b/src/video/x11/SDL_x11modes.c	Sat Jul 07 08:08:42 2001 +0000
@@ -271,7 +271,7 @@
         }
         XFree(modes);
 
-        use_vidmode = 1;
+        use_vidmode = vm_major;
         save_mode(this);
     }
 #endif /* XFREE86_VM */