[SDL] resizable windows

nfries88 nfries88 at yahoo.com
Mon Mar 1 04:43:45 PST 2010


First off, you're only drawing the squares when resizing now. It seems like this is not what you want.

To fix what you want with the way you have it now, though:

Code:

               SDL_Surface* light_square = SDL_CreateRGBSurface (SDL_HWSURFACE, min(width, height)/8, min(width, height)/8, 32, 0, 0, 0, 0);
               SDL_FillRect (light_square, NULL, SDL_MapRGB (screen->format, 255, 206, 158));

               SDL_Surface* dark_square = SDL_CreateRGBSurface (SDL_HWSURFACE, min(width, height)/8, min(width, height)/8, 32, 0, 0, 0, 0);
               SDL_FillRect (dark_square, NULL, SDL_MapRGB(screen->format, 209, 139, 71));







-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.libsdl.org/pipermail/sdl-libsdl.org/attachments/20100301/ec6e5a5c/attachment.htm>


More information about the SDL mailing list