aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoricculus <icculus@edf5b092-35ff-0310-97b2-ce42778d08ea>2009-09-15 02:51:09 +0000
committericculus <icculus@edf5b092-35ff-0310-97b2-ce42778d08ea>2009-09-15 02:51:09 +0000
commiteaad28cd9373face0a7f8160d3620a273f249bac (patch)
tree126b9c638618d0d454b8bb3b9cb4ebd7fa1d6527
parentce2c190e843e19ada5ebaa284827a98d55bf98fc (diff)
downloadioquake3-aero-eaad28cd9373face0a7f8160d3620a273f249bac.tar.gz
ioquake3-aero-eaad28cd9373face0a7f8160d3620a273f249bac.zip
Handle r_colorbits values better.
Fixes Bugzilla #4244. git-svn-id: svn://svn.icculus.org/quake3/trunk@1610 edf5b092-35ff-0310-97b2-ce42778d08ea
-rw-r--r--code/sdl/sdl_glimp.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/code/sdl/sdl_glimp.c b/code/sdl/sdl_glimp.c
index 4804d31..82f6e22 100644
--- a/code/sdl/sdl_glimp.c
+++ b/code/sdl/sdl_glimp.c
@@ -265,10 +265,9 @@ static int GLimp_SetMode( int mode, qboolean fullscreen )
else
glConfig.isFullscreen = qfalse;
- if (!r_colorbits->value)
+ colorbits = r_colorbits->value;
+ if ((!colorbits) || (colorbits >= 32))
colorbits = 24;
- else
- colorbits = r_colorbits->value;
if (!r_depthbits->value)
depthbits = 24;