[SDL] [SPAM] Toggling fullscreen at run time.

Brian brian.ripoff at gmail.com
Fri Aug 24 12:02:35 PDT 2007


SDL_GetVideoSurface() is your friend. No need to store it globally
yourself when SDL does it for you =)
I don't know what the API for 1.3 will look like for this however...

> Personally, I store the pointer to the actual display surface globally. To
> switch between full- and windowed modes, I call SDL_QuitSubSystem
> (SDL_INIT_VIDEO), which (if I am not mistaking) does the video-cleanup for
> me. Then I just Initialize the video again, and re-open a display surface,
> with (or without) SDL_FULLSCREEN. This has worked just fine for me and as
> far as I can tell there has not been any problems, and I am able to switch
> between screenmodes without interrupting the program itself.


More information about the SDL mailing list