[SDL] Determine player's video's color depth...

Milan Babuskov albis at eunet.yu
Tue Nov 11 07:35:01 PST 2003

Rico Zuñiga wrote:
> I have just found out what's slowing down the the graphics in a game i'm making - setting the viedo to 32 bits per pixel, whereas my video can only support up to 24 bits per pixel. You might think this is stupid of me not realizing this sooner, but i'm a newbie and was just following the tutorial verbatim. So anyway after setting it to 24 bits, my game performed really well. My question now is how can I determine the appropriate bits per pixel to set for the other people who would play my game. Is there a way to determine (dynamically) the video settings of other people's machines.

My experience tells me that there's no need to. Just make sure you use 
SDL_DisplayFormat() for your graphics, and it will run great.

Try setting video back to 32bit, and just use SDL_DisplayFormat() on all 
your graphics to see the difference...


Milan Babuskov

More information about the SDL mailing list