]> git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - vid_shared.c
if hardware gamma setting fails, try to restore system gamma anyway (Windows stupidity)
[xonotic/darkplaces.git] / 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
        {