comparison src/video/dga/SDL_dgavideo.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 b8d311d90021
children 045f186426e1
comparison
equal deleted inserted replaced
965:b68e551205e9 966:f72cc0c7305f
282 const SDL_NAME(XDGAMode) *b = (const SDL_NAME(XDGAMode) *)vb; 282 const SDL_NAME(XDGAMode) *b = (const SDL_NAME(XDGAMode) *)vb;
283 283
284 /* Prefer DirectColor visuals for otherwise equal modes */ 284 /* Prefer DirectColor visuals for otherwise equal modes */
285 if ( (a->viewportWidth == b->viewportWidth) && 285 if ( (a->viewportWidth == b->viewportWidth) &&
286 (b->viewportHeight == a->viewportHeight) ) { 286 (b->viewportHeight == a->viewportHeight) ) {
287 if ( a->visualClass == DirectColor ) 287 if ( a->visualClass == DirectColor )
288 return -1; 288 return -1;
289 if ( b->visualClass == DirectColor ) 289 if ( b->visualClass == DirectColor )
290 return 1; 290 return 1;
291 return 0; 291 return 0;
292 } else if ( a->viewportWidth == b->viewportWidth ) {
293 return b->viewportHeight - a->viewportHeight;
292 } else { 294 } else {
293 if(a->viewportWidth > b->viewportWidth) 295 return b->viewportWidth - a->viewportWidth;
294 return -1;
295 return b->viewportHeight - a->viewportHeight;
296 } 296 }
297 } 297 }
298 static void UpdateHWInfo(_THIS, SDL_NAME(XDGAMode) *mode) 298 static void UpdateHWInfo(_THIS, SDL_NAME(XDGAMode) *mode)
299 { 299 {
300 this->info.wm_available = 0; 300 this->info.wm_available = 0;