Mercurial > sdl-ios-xcode
comparison src/video/windib/SDL_dibvideo.c @ 1771:8d3ca155c396
Fixed bug #217
Sort the DirectX video modes largest to smallest
author | Sam Lantinga <slouken@libsdl.org> |
---|---|
date | Sun, 07 May 2006 04:02:48 +0000 |
parents | 8d9bb0cf2c2a |
children | 61f86f36afb9 |
comparison
equal
deleted
inserted
replaced
1770:1632155c67e5 | 1771:8d3ca155c396 |
---|---|
346 DIB_AddMode(this, settings.dmBitsPerPel, | 346 DIB_AddMode(this, settings.dmBitsPerPel, |
347 settings.dmPelsHeight, settings.dmPelsWidth); | 347 settings.dmPelsHeight, settings.dmPelsWidth); |
348 #endif | 348 #endif |
349 } | 349 } |
350 /* Sort the mode lists */ | 350 /* Sort the mode lists */ |
351 if( i > 1 ) | |
352 for ( i=0; i<NUM_MODELISTS; ++i ) { | 351 for ( i=0; i<NUM_MODELISTS; ++i ) { |
353 if ( SDL_nummodes[i] > 0 ) { | 352 if ( SDL_nummodes[i] > 0 ) { |
354 SDL_qsort(SDL_modelist[i], SDL_nummodes[i], sizeof *SDL_modelist[i], cmpmodes); | 353 SDL_qsort(SDL_modelist[i], SDL_nummodes[i], sizeof *SDL_modelist[i], cmpmodes); |
355 } | 354 } |
356 } | 355 } |
359 // We use only vformat->BitsPerPixel that allow SDL to | 358 // We use only vformat->BitsPerPixel that allow SDL to |
360 // emulate other bpp (8, 32) and use triple buffer, | 359 // emulate other bpp (8, 32) and use triple buffer, |
361 // because SDL surface conversion is much faster than the WinCE one. | 360 // because SDL surface conversion is much faster than the WinCE one. |
362 // Although it should be tested on devices with graphics accelerator. | 361 // Although it should be tested on devices with graphics accelerator. |
363 | 362 |
364 DIB_AddMode(this, vformat->BitsPerPixel, | 363 DIB_AddMode(this, vformat->BitsPerPixel, |
365 GetDeviceCaps(GetDC(NULL), HORZRES), | 364 GetDeviceCaps(GetDC(NULL), HORZRES), |
366 GetDeviceCaps(GetDC(NULL), VERTRES)); | 365 GetDeviceCaps(GetDC(NULL), VERTRES)); |
367 | 366 |
368 #endif /* !NO_CHANGEDISPLAYSETTINGS */ | 367 #endif /* !NO_CHANGEDISPLAYSETTINGS */ |
369 | 368 |