aboutsummaryrefslogtreecommitdiffstats
path: root/code
diff options
context:
space:
mode:
authorludwig <ludwig@edf5b092-35ff-0310-97b2-ce42778d08ea>2005-09-08 08:34:32 +0000
committerludwig <ludwig@edf5b092-35ff-0310-97b2-ce42778d08ea>2005-09-08 08:34:32 +0000
commit2dc9103b05d8febc76b45b33309579f1d142249b (patch)
tree8990e8ef4b8d4b8841141142d4d00936745b240b /code
parent2b1fe5f7811a847da2442e00596b633459dc2371 (diff)
downloadioquake3-aero-2dc9103b05d8febc76b45b33309579f1d142249b.tar.gz
ioquake3-aero-2dc9103b05d8febc76b45b33309579f1d142249b.zip
use r_ignorehwgamma cvar to allow user to disable gamma correction
git-svn-id: svn://svn.icculus.org/quake3/trunk@89 edf5b092-35ff-0310-97b2-ce42778d08ea
Diffstat (limited to 'code')
-rw-r--r--code/unix/sdl_glimp.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/code/unix/sdl_glimp.c b/code/unix/sdl_glimp.c
index be5b693..c20f394 100644
--- a/code/unix/sdl_glimp.c
+++ b/code/unix/sdl_glimp.c
@@ -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
// 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);
}
@@ -1450,3 +1455,4 @@ void IN_JoyMove( void )
// end of linux_glimp_sdl.c ...
+