Windowed/fullscreen toggle?

Okay, the new fullscreen code seems to work great (well, for everything that
I’m working on). I was thinking though (dangerous, I know), would it be
possible to toggle between windowed and fullscreen modes? I’m at work now,
so I can’t try any ideas I have, but just wanted to throw this out to see if
anyone has any ideas on it? Is it possible to use SetVideoMode() and copy
the original (windowed) surface over to the returned (full screen) surface?

  • PenguinDude at his Microsoft infested hell of a job
    (send personal replies to davea at radiks.net)

Okay, the new fullscreen code seems to work great (well, for everything that
I’m working on). I was thinking though (dangerous, I know), would it be
possible to toggle between windowed and fullscreen modes? I’m at work now,
so I can’t try any ideas I have, but just wanted to throw this out to see if
anyone has any ideas on it? Is it possible to use SetVideoMode() and copy
the original (windowed) surface over to the returned (full screen) surface?

Yep. I’ve actually designed it so that if you do:

SDL_SetVideoMode(old_width, old_height, old_depth, !old_flags);

it is essentially a fullscreen toggle. :slight_smile:

-Sam Lantinga				(slouken at devolution.com)

Lead Programmer, Loki Entertainment Software–
“Any sufficiently advanced bug is indistinguishable from a feature”
– Rich Kulawiec

Great!

Okay, the new fullscreen code seems to work great (well, for everything
that

I’m working on). I was thinking though (dangerous, I know), would it be
possible to toggle between windowed and fullscreen modes? I’m at work
now,

so I can’t try any ideas I have, but just wanted to throw this out to
see if

anyone has any ideas on it? Is it possible to use SetVideoMode() and
copy

the original (windowed) surface over to the returned (full screen)
surface?On Thursday, January 13, 2000 1:42 PM, Sam Lantinga [SMTP:slouken at devolution.com] wrote:

Yep. I’ve actually designed it so that if you do:

SDL_SetVideoMode(old_width, old_height, old_depth, !old_flags);

it is essentially a fullscreen toggle. :slight_smile:

-Sam Lantinga (slouken at devolution.com)

Lead Programmer, Loki Entertainment Software

“Any sufficiently advanced bug is indistinguishable from a feature”
– Rich Kulawiec