[SDL] [PATCH] Function to get desktop resolution
bob at pendleton.com
Mon Jan 31 07:39:38 PST 2005
On Fri, 2005-01-28 at 23:56 +0000, Jon Colverson wrote:
> 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.
No matter how much lipstick you put on that pig, it is still a pig.
Negative number are an error, not a way to specify an option.
More information about the SDL