]> de.git.xonotic.org Git - xonotic/darkplaces.git/commitdiff
if hardware gamma setting fails, try to restore system gamma anyway (Windows stupidity)
authorhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Fri, 21 Jan 2005 03:34:22 +0000 (03:34 +0000)
committerhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Fri, 21 Jan 2005 03:34:22 +0000 (03:34 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@4948 d7cf8633-e32d-0410-b094-e92efae38249

vid_shared.c

index eeac1c579591204c83f732df236716ed2d93929a..a9ea605c534a245f74397b4dacb90a30300cfdad 100644 (file)
@@ -918,6 +918,9 @@ void VID_UpdateGamma(qboolean force)
                }
 
                Cvar_SetValueQuick(&vid_hardwaregammasupported, VID_SetGamma(vid_gammaramps));
+               // if custom gamma ramps failed (Windows stupidity), restore to system gamma
+               if(!vid_hardwaregammasupported.integer)
+                       VID_SetGamma(vid_systemgammaramps);
        }
        else
        {