• Patrice Mandin's avatar
    [PATCH] SDL_GetVideoMode() does not find best mode, part 2 · ecf79e4d
    Patrice Mandin authored
    Following commit 1.51, I come accross a problem when SDL must choose between
    several video modes that could suit the one asked.
    
    If I ask 320x240 with this list:
    768x480 768x240 640x400 640x200 384x480 384x240 320x400 320x200
    
    The smallest selectables modes are 384x240 and 320x400. And SDL choose the later
    in this list, but 384x240 is more suitable. So I added a check to compare
    the pixel count (surface) of modes, and select the one which has the smallest
    pixel count.
    
    In my example, 384x240 has 92160 pixels, and 320x400 has 128000 pixels. So now
    SDL will choose 384x240 for the asked 320x240 mode.
    
    --HG--
    extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%401260
    ecf79e4d
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...
loadso 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...
Makefile.wat 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...