• Patrice Mandin's avatar
    [PATCH] SDL_GetVideoMode() do not find the best video mode · f1867eeb
    Patrice Mandin authored
    The current GetVideoMode() function stops at the first mode which has any
    dimensions smaller than the one asked, and gives the previous in the list.
    
    If I ask 336x224 with this list:
    768x480 768x240 640x400 640x200 384x480 384x240 320x400 320x200
    SDL will give me 640x400, because 640x200 as height smaller than what I
    asked.
    
    However the best mode is the smaller which has both dimensions bigger
    than the one asked (384x240 in my example).
    
    This patch fixes this, plus it does not rely on a sorted video mode list.
    
    --HG--
    extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%401077
    f1867eeb
Name
Last commit
Last update
..
audio Loading commit data...
cdrom Loading commit data...
cpuinfo Loading commit data...
endian Loading commit data...
events Loading commit data...
file Loading commit data...
hermes Loading commit data...
joystick Loading commit data...
main Loading commit data...
thread Loading commit data...
timer Loading commit data...
video Loading commit data...
.cvsignore Loading commit data...
Makefile.am Loading commit data...
SDL.c Loading commit data...
SDL_error.c Loading commit data...
SDL_error_c.h Loading commit data...
SDL_fatal.c Loading commit data...
SDL_fatal.h Loading commit data...
SDL_getenv.c Loading commit data...
SDL_loadso.c Loading commit data...