sw gamma now seems to work

This commit is contained in:
Bill Currie 2001-04-23 18:39:14 +00:00
parent 6a75c4e00d
commit 2d5f4b86fb

View file

@ -271,18 +271,20 @@ byte gammatable[256]; // palette is sent through this
qboolean
V_CheckGamma (void)
{
static float oldbrightness;
static float oldcontrast;
//static float oldbrightness;
//static float oldcontrast;
static float oldgamma;
if (oldgamma != vid_gamma->value)
if (oldgamma != vid_gamma->value) {
oldgamma = vid_gamma->value;
VID_UpdateGamma (vid_gamma);
if ((brightness->value == oldbrightness) && contrast->value == oldcontrast)
return false;
oldbrightness = brightness->value;
oldcontrast = contrast->value;
}
//if ((brightness->value == oldbrightness) && contrast->value == oldcontrast)
// return false;
//oldbrightness = brightness->value;
//oldcontrast = contrast->value;
BuildGammaTable (brightness->value, contrast->value);
//BuildGammaTable (brightness->value, contrast->value);
vid.recalc_refdef = 1; // force a surface cache flush
return true;