winlayer: Remove code that worked around a (wrongly) not set have_ATI variable.

This was fixed with the preceding change; software mode will now always use
software gamma if an ATI/AMD card is detected.

git-svn-id: https://svn.eduke32.com/eduke32@2634 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
helixhorned 2012-05-05 22:22:05 +00:00
parent dcd66dad62
commit bbc020bace

View file

@ -41,7 +41,6 @@
#define ANY_WINDOWED_SIZE
static mutex_t m_initprintf;
static int32_t winlayer_uselastgamma = -1;
static int32_t winlayer_have_ATI = 0;
int32_t _buildargc = 0;
@ -2230,13 +2229,6 @@ int32_t setpalette(int32_t start, int32_t num)
return -1;
}
if (winlayer_have_ATI)
{
winlayer_uselastgamma = (winlayer_uselastgamma!=-1);
setgamma();
winlayer_uselastgamma = 0;
}
return 0;
}
@ -2341,7 +2333,6 @@ int32_t setgamma(void)
// This formula is taken from Doomsday
if (winlayer_uselastgamma <= 0)
for (i = 0; i < 256; i++)
{
double val = i * contrast - (contrast - 1) * 127;
@ -2350,6 +2341,7 @@ int32_t setgamma(void)
gammaTable[0][i] = gammaTable[1][i] = gammaTable[2][i] = (WORD)max(0.f,(double)min(0xffff,val*256));
}
return setgammaramp(gammaTable);
}