aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorludwig <ludwig@edf5b092-35ff-0310-97b2-ce42778d08ea>2008-04-13 08:30:48 +0000
committerludwig <ludwig@edf5b092-35ff-0310-97b2-ce42778d08ea>2008-04-13 08:30:48 +0000
commit26cc9629c9968cd0ae215f6ad136abd4e9671840 (patch)
tree67e12c77244cd3869147f2a1ea592a331c769998
parent43a568b3a3ce399af81708c45b21c88cd9cae515 (diff)
downloadioquake3-aero-26cc9629c9968cd0ae215f6ad136abd4e9671840.tar.gz
ioquake3-aero-26cc9629c9968cd0ae215f6ad136abd4e9671840.zip
sort video modes only if there are modes to sort
git-svn-id: svn://svn.icculus.org/quake3/trunk@1319 edf5b092-35ff-0310-97b2-ce42778d08ea
-rw-r--r--code/sdl/sdl_glimp.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/code/sdl/sdl_glimp.c b/code/sdl/sdl_glimp.c
index a6c0a30..b933a86 100644
--- a/code/sdl/sdl_glimp.c
+++ b/code/sdl/sdl_glimp.c
@@ -166,7 +166,8 @@ static void GLimp_DetectAvailableModes(void)
for( numModes = 0; modes[ numModes ]; numModes++ );
- qsort( modes, numModes, sizeof( SDL_Rect* ), GLimp_CompareModes );
+ if(numModes > 1)
+ qsort( modes+1, numModes-1, sizeof( SDL_Rect* ), GLimp_CompareModes );
for( i = 0; i < numModes; i++ )
{