[SDL] In Win32, can't return to the original resolution after a SDL_Quit()

John Popplewell john at johnnypops.demon.co.uk
Mon Jul 1 00:12:01 PDT 2002


Hi,

> ... it doesn't switch back to the previous, normal desktop resolution. 
> Is there any way to fix that? ...

It should do.

The following minimalist program works for me on Win98SE with
my desktop at 1280x1024x16 and 1280x1024x32 (various other 
combinations also work OK),

cheers,
John.
PS Press a key to exit!


#include "sdl.h"

int main(int argc, char **argv)
{
    SDL_Event event;

    SDL_Init(SDL_INIT_VIDEO);
    SDL_SetVideoMode(1024, 768, 16, SDL_OPENGL | SDL_FULLSCREEN );

    while(1) {
        SDL_WaitEvent(&event);
        if (event.type == SDL_KEYDOWN)
            break;
    }

    SDL_Quit();
    return 0;
}



----- Original Message -----
From: "Robert Goulet" <moebious at videotron.ca>
To: <sdl at libsdl.org>
Sent: Monday, July 01, 2002 5:03 AM
Subject: [SDL] In Win32, can't return to the original resolution after a
SDL_Quit()


For some reason, under Win32, when I use fullscreen, and then end the
application (with an appropiate SDL_Quit() call), it doesn't switch
back to the previous, normal desktop resolution. Is there any way to fix
that?
The exact call when I set the video mode is:
SDL_SetVideoMode(1024, 768, mVideoInfo->vfmt->BitsPerPixel, SDL_OPENGL |
SDL_FULLSCREEN )






More information about the SDL mailing list