r1319 - trunk/code/sdl

DONOTREPLY at icculus.org DONOTREPLY at icculus.org
Sun Apr 13 04:30:48 EDT 2008


Author: ludwig
Date: 2008-04-13 04:30:48 -0400 (Sun, 13 Apr 2008)
New Revision: 1319

Modified:
   trunk/code/sdl/sdl_glimp.c
Log:
sort video modes only if there are modes to sort


Modified: trunk/code/sdl/sdl_glimp.c
===================================================================
--- trunk/code/sdl/sdl_glimp.c	2008-04-12 20:05:33 UTC (rev 1318)
+++ trunk/code/sdl/sdl_glimp.c	2008-04-13 08:30:48 UTC (rev 1319)
@@ -166,7 +166,8 @@
 
 	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++ )
 	{




More information about the quake3-commits mailing list