mirror of
https://github.com/ZDoom/raze-gles.git
synced 2025-01-12 11:10:39 +00:00
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:
parent
dcd66dad62
commit
bbc020bace
1 changed files with 8 additions and 16 deletions
|
@ -41,7 +41,6 @@
|
||||||
#define ANY_WINDOWED_SIZE
|
#define ANY_WINDOWED_SIZE
|
||||||
|
|
||||||
static mutex_t m_initprintf;
|
static mutex_t m_initprintf;
|
||||||
static int32_t winlayer_uselastgamma = -1;
|
|
||||||
static int32_t winlayer_have_ATI = 0;
|
static int32_t winlayer_have_ATI = 0;
|
||||||
|
|
||||||
int32_t _buildargc = 0;
|
int32_t _buildargc = 0;
|
||||||
|
@ -2230,13 +2229,6 @@ int32_t setpalette(int32_t start, int32_t num)
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (winlayer_have_ATI)
|
|
||||||
{
|
|
||||||
winlayer_uselastgamma = (winlayer_uselastgamma!=-1);
|
|
||||||
setgamma();
|
|
||||||
winlayer_uselastgamma = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2341,7 +2333,6 @@ int32_t setgamma(void)
|
||||||
|
|
||||||
// This formula is taken from Doomsday
|
// This formula is taken from Doomsday
|
||||||
|
|
||||||
if (winlayer_uselastgamma <= 0)
|
|
||||||
for (i = 0; i < 256; i++)
|
for (i = 0; i < 256; i++)
|
||||||
{
|
{
|
||||||
double val = i * contrast - (contrast - 1) * 127;
|
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));
|
gammaTable[0][i] = gammaTable[1][i] = gammaTable[2][i] = (WORD)max(0.f,(double)min(0xffff,val*256));
|
||||||
}
|
}
|
||||||
|
|
||||||
return setgammaramp(gammaTable);
|
return setgammaramp(gammaTable);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue