• Sam Lantinga's avatar
    Florian Forster to sdl · e3408530
    Sam Lantinga authored
    in SDL 1.3 (revision 5508 from SVN), the method used to calculate the
    bits per pixel from a “int format” differ between “SDL_ListModes” (which
    always uses the “SDL_BITSPERPIXEL” macro) and “SDL_PixelFormatEnumTo-
    Masks” (which uses either “SDL_BITSPERPIXEL” or “SDL_BYTESPERPIXEL * 8”,
    depending on the value of “SDL_BYTESPERPIXEL”).
    
    Because the values are later compared in “SDL_ListModes” this may lead
    to some valid video modes not being returned. In my case the only mode
    returned by “SDL_GetNumDisplayModes” was dismissed and NULL was
    returned. (This led to the calling application sticking its head in the
    sand.)
    
    The attached patch copies the method used within “SDL_PixelFormatEnumTo-
    Masks” to “SDL_ListModes”. This solved the problem for me though I don't
    fully understand the method used by “SDL_PixelFormatEnumToMasks”.
    e3408530
Name
Last commit
Last update
..
atomic Loading commit data...
audio Loading commit data...
cpuinfo Loading commit data...
events Loading commit data...
file Loading commit data...
haptic Loading commit data...
joystick Loading commit data...
libm Loading commit data...
loadso Loading commit data...
main Loading commit data...
power Loading commit data...
stdlib Loading commit data...
thread Loading commit data...
timer Loading commit data...
video Loading commit data...
SDL.c Loading commit data...
SDL_android.cpp Loading commit data...
SDL_android.h Loading commit data...
SDL_assert.c Loading commit data...
SDL_assert_c.h Loading commit data...
SDL_compat.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...