sort video modes only if there are modes to sort

This commit is contained in:
Ludwig Nussel 2008-04-13 08:30:48 +00:00
parent cebdb640f3
commit 89a5a6429e

View file

@ -166,7 +166,8 @@ static void GLimp_DetectAvailableModes(void)
for( numModes = 0; modes[ numModes ]; numModes++ ); 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++ ) for( i = 0; i < numModes; i++ )
{ {