SDL_ListModes format


I want to get a list of video modes with any BPP 15 or higher pixel
format, without caring about whether the video mode supports OpenGL,
hardware sufaces, etc, and without caring about the pixel format
itself (RGB, BGR, etc).

The only way I can think of to do this is to get many different lists
(one for each pixel format and combination of flags). The problem here
is that total number of possible permutations could lead to a large
number of small lists containing indistiguishable duplicates…

I’m also not sure which fields in the SDL_PixelFormat structure
actually matter - for example, can I set BitsPerPixel and
BytesPerPixel and skip everything else (which would drastically reduce
the number of seperate lists I need to ask for)?

BTW there’s also a “SDL_ANYFORMAT” flag, but the “SDL_Rect” data
returned doesn’t contain enough information to allow the 8 BPP modes
to be filtered out…

Does anyone have any ideas? :slight_smile: