[SDL] [SPAM] Toggling fullscreen at run time.
Peter Ketting
peterketting at sysmatrix.net
Fri Aug 24 10:49:35 PDT 2007
>> So, I can just call the SDL_SetVideoMode() again but without the
>> SDL_FULLSCREEN flag, right? But will it return the same display surface
>> pointer?
>
> It may, but you can't guarantee it.
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.
Cheers,
Peter
More information about the SDL
mailing list