Full screen switching problems on Windows

Hey,

From the info I have been able to gather, it is possible to switch between
full screen and windowed mode on Windows by using SDL_SetVideoMode. On some
machines this seems to work great, but on others I have had problems. On one
of the machines I tested on, when I switched to full screen the colors went
amuck. it looked as if they had all been inverted. This applied to every
surface that was drawn. On another machine, when I switched to full screen I
just got a strait out crash.

Is this method of switching between windowed and full screen mode using
SDL_SetVideoMode supported? Or is there something I need to do (i.e. close
down the video module) that I am not aware of?

Thanks in advance,
Dave

This might be a problem with the screen depth changing when you toggle
between full and windowed. When toggling, my game reloads and reconverts
all the graphics to the display surface format using SDL_DisplayFormat().
It also recreates the off-screen buffer using the new bit depth. Change
your desktop color depth and see if the symptoms change. Do you have any
problem starting out in windowed or full-screen, or just when toggling?

Checking my code, I see I’m also quitting the SDL_INIT_VIDEO subsystem and
bringing it back up just before calling SDL_SetVideoMode, but I’m not sure
if that’s a necessary step.=========
Eric W. Lund
Gearhand Studios
http://www.gearhand.com

At 08:20 PM 10/9/2003 -0700, you wrote:

From the info I have been able to gather, it is possible to switch between
full screen and windowed mode on Windows by using SDL_SetVideoMode. On some
machines this seems to work great, but on others I have had problems. On one
of the machines I tested on, when I switched to full screen the colors went
amuck. it looked as if they had all been inverted. This applied to every
surface that was drawn. On another machine, when I switched to full screen I
just got a strait out crash.

Is this method of switching between windowed and full screen mode using
SDL_SetVideoMode supported? Or is there something I need to do (i.e. close
down the video module) that I am not aware of?