comparison src/video/windib/SDL_dibvideo.c @ 966:f72cc0c7305f

Video modes are sorted width first, then height
author Sam Lantinga <slouken@libsdl.org>
date Fri, 12 Nov 2004 21:25:42 +0000
parents 31fa08b36380
children 96671ebc50a4
comparison
equal deleted inserted replaced
965:b68e551205e9 966:f72cc0c7305f
199 199
200 static int cmpmodes(const void *va, const void *vb) 200 static int cmpmodes(const void *va, const void *vb)
201 { 201 {
202 SDL_Rect *a = *(SDL_Rect **)va; 202 SDL_Rect *a = *(SDL_Rect **)va;
203 SDL_Rect *b = *(SDL_Rect **)vb; 203 SDL_Rect *b = *(SDL_Rect **)vb;
204 if(a->w > b->w) 204 if ( a->w == b->w )
205 return -1; 205 return b->h - a->h;
206 return b->h - a->h; 206 else
207 return b->w - a->w;
207 } 208 }
208 209
209 static int DIB_AddMode(_THIS, int bpp, int w, int h) 210 static int DIB_AddMode(_THIS, int bpp, int w, int h)
210 { 211 {
211 SDL_Rect *mode; 212 SDL_Rect *mode;