From 55a5c1810b8e3f9930a760363e4872b52f397c14 Mon Sep 17 00:00:00 2001 From: havoc Date: Fri, 21 Jan 2005 03:34:22 +0000 Subject: [PATCH] if hardware gamma setting fails, try to restore system gamma anyway (Windows stupidity) git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@4948 d7cf8633-e32d-0410-b094-e92efae38249 --- vid_shared.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/vid_shared.c b/vid_shared.c index eeac1c57..a9ea605c 100644 --- a/vid_shared.c +++ b/vid_shared.c @@ -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 { -- 2.39.2