Fullscreen mode

I switched my screen surface to fullscreen mode, but when I quit the app with SDL_Quit(), the machine is stuck in the resolution it changed to (it doesn’t change back or let me change my resolution using the ctrl-alt-numpad +/- combos). Killing X will fix it, but I’d rather not have to do that.

Is there a way to make SDL switch it back?

Make sure you’re calling SDL_Quit() before the program exits. An easy way to
make sure this will always happen is to call atexit() right after SDL_Init(),
like this:
SDL_Init(SDL_INIT_VIDEO);
atexit(SDL_Quit);
Notice that there are no parenthesis in the params to atexit() (
atexit(SDL_Quit) instead of atexit(SDL_Quit()) ). This is because you’re
passing the address of SDL_Quit to atexit(), not its return value.

-Sean RidenourOn Friday 10 October 2003 1:16 pm, mike stedman wrote:

I switched my screen surface to fullscreen mode, but when I quit the app
with SDL_Quit(), the machine is stuck in the resolution it changed to (it
doesn’t change back or let me change my resolution using the
ctrl-alt-numpad +/- combos). Killing X will fix it, but I’d rather not have
to do that.

Is there a way to make SDL switch it back?