[SDL] Full Screen Toggle

René Dudfield renesd at gmail.com
Mon Jun 30 19:43:19 PDT 2008


No, you can't rely on other surfaces being valid... but if they are
software surfaces, they'll likely be valid.

I think the SDL_WM_ToggleFullScreen finally works on most platforms
with latest SDL?

SDL doesn't know about multi monitor setups -- and seems to fail a bit
with them.  Unfortunately :(



On Tue, Jul 1, 2008 at 12:06 PM, Peter Ketting
<peterketting at sysmatrix.net> wrote:
> Hi all,
>
> I've implemented a windowed/full screen toggle into my game. It does this by
> calling SDL_QuitSubSystem (SDL_INIT_VIDEO) to close the window / screen, and
> then re-initialises it with SDL_InitSubSystem (SDL_INIT_VIDEO) before
> re-creating the primary surface.
>
> Is this about the right way to go about it? This method works well for me,
> but someone who used dual monitors experienced a crash when trying to
> re-initialise the video system (though going straight to full-screen at the
> start did not pose any problems).
>
> Cheers,
> Peter
>
> p.s.: I never thought this much through, but it seems that all other created
> surfaces remain unchanged after calling SDL_QuitSubSystem (SDL_INIT_VIDEO),
> is this something I can rely on?
>
> _______________________________________________
> SDL mailing list
> SDL at lists.libsdl.org
> http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
>



More information about the SDL mailing list