Win32 - Switching desktop video mode while windowed

When one changes the desktop video mode when one has an SDL application
running in windowed mode, one is left with a pure-black SDL window with
the program still running. If you switch back to the previous video
mode, the window starts working again.

The console window(I tend to compile in console-mode) was still working
fine, so I added code to catch SDL_VIDEORESIZE events - and to my
suprise, there weren’t any. It would be very convenient if SDL could
generate a SDL_VIDEORESIZE event when Windows switches video modes on
you; is this possible?

Corona688 wrote:

The console window(I tend to compile in console-mode) was still working
fine, so I added code to catch SDL_VIDEORESIZE events - and to my
suprise, there weren’t any. It would be very convenient if SDL could
generate a SDL_VIDEORESIZE event when Windows switches video modes on
you; is this possible?

i assume you should be getting SDL_ACTIVEEVENT when this happens? i’m not
sure of the specifics, but perhaps just watch for these events and see how
they interact with what you are doing?

Yes, I do get SDL_ACTIVEEVENT. However, I also get SDL_ACTIVEEVENT at times
when Windows is not changing resolutions so that’s unfortunately not very
useful. :frowning:

Pete Shinners wrote:> i assume you should be getting SDL_ACTIVEEVENT when this happens? i’m not

sure of the specifics, but perhaps just watch for these events and see how
they interact with what you are doing?


SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl