mirror of
https://github.com/ioquake/ioq3.git
synced 2024-11-14 00:40:39 +00:00
use r_ignorehwgamma cvar to allow user to disable gamma correction
This commit is contained in:
parent
cda15d093a
commit
4caa237d5f
1 changed files with 7 additions and 1 deletions
|
@ -442,7 +442,12 @@ void GLimp_SetGamma( unsigned char red[256], unsigned char green[256], unsigned
|
||||||
{
|
{
|
||||||
// NOTE TTimo we get the gamma value from cvar, because we can't work with the s_gammatable
|
// NOTE TTimo we get the gamma value from cvar, because we can't work with the s_gammatable
|
||||||
// the API wasn't changed to avoid breaking other OSes
|
// the API wasn't changed to avoid breaking other OSes
|
||||||
float g = Cvar_Get("r_gamma", "1.0", 0)->value;
|
float g;
|
||||||
|
|
||||||
|
if ( r_ignorehwgamma->integer )
|
||||||
|
return;
|
||||||
|
|
||||||
|
g = Cvar_Get("r_gamma", "1.0", 0)->value;
|
||||||
SDL_SetGamma(g, g, g);
|
SDL_SetGamma(g, g, g);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1450,3 +1455,4 @@ void IN_JoyMove( void )
|
||||||
// end of linux_glimp_sdl.c ...
|
// end of linux_glimp_sdl.c ...
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue