[SDL] [PATCH] Function to get desktop resolution

Jon Colverson sdl at vcxz.co.uk
Fri Jan 28 15:56:19 PST 2005


David Olofson wrote:
> How about this:
> ----
> SDL_Surface* screen = SDL_SetVideoMode(-1024, -768, bpp, flags);
> ----
> 
> where the negative arguments mean "use the desktop resolution if 
> possible, otherwise use labs(width), labs(height)?"
> 
> 
> That said, I like plain 0, 0 much better for some reason. I can live 
> with 0 and some #defined (negative) values having special meanings, 
> but negative sizes...? Eww...! :-)

Yeah, it's a neat idea, but I don't think negative sizes are very intuitive.

-- 
Jon




More information about the SDL mailing list