From: havoc Date: Fri, 23 Jun 2006 06:31:32 +0000 (+0000) Subject: fix gamma 'flicker' bug caused by gamma_forcenextframe being repeatedly set when... X-Git-Tag: xonotic-v0.1.0preview~3895 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=ce7add25216cbc67c3d7bbc17874297e82fa9554;p=xonotic%2Fdarkplaces.git fix gamma 'flicker' bug caused by gamma_forcenextframe being repeatedly set when gamma fails git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@6483 d7cf8633-e32d-0410-b094-e92efae38249 --- diff --git a/vid_shared.c b/vid_shared.c index 18591664..d333d476 100644 --- a/vid_shared.c +++ b/vid_shared.c @@ -829,12 +829,21 @@ void VID_UpdateGamma(qboolean force, int rampsize) // if custom gamma ramps failed (Windows stupidity), restore to system gamma if(!vid_hardwaregammasupported.integer) { - VID_RestoreSystemGamma(); - Cvar_SetValueQuick(&vid_hardwaregammasupported, false); + if (vid_usinghwgamma) + { + vid_usinghwgamma = false; + VID_SetGamma(vid_systemgammaramps, vid_gammarampsize); + } } } else - VID_RestoreSystemGamma(); + { + if (vid_usinghwgamma) + { + vid_usinghwgamma = false; + VID_SetGamma(vid_systemgammaramps, vid_gammarampsize); + } + } } void VID_RestoreSystemGamma(void)