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 )

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: moebious@videotron.ca (Robert Goulet)
To:
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 )

Well, it doesn’t works for me (your minimal program)… I know that it
should. Maybe I could try updating my video driver. (I got a GF2MX400 64M).
It does the same thing in Win2000 and Win98SE.

There’s another issue in the way SDL work in Windows. When I change the
resolution to anything that is fullscreen, the vertical refresh used is
always the poorest of all. I checked my desktop properties, and it is set to
"use best refresh". So why is it using the poorest refresh rate in
fullscreen mode in Winshit?

thanks, boB.> ----- Original Message -----

From: john@johnnypops.demon.co.uk (John Popplewell)
To:
Sent: Monday, July 01, 2002 3:10 AM
Subject: Re: [SDL] In Win32, can’t return to the original resolution after a
SDL_Quit()

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” <@Robert_Goulet>
To:
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 )


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

This is a known issue. If you try any other (non-SDL) fullscreen program, the
refresh rate should drop as well. Try searching Google for “nvidia refresh
rate fix”.

cu,
NicolaiAm Montag, 1. Juli 2002 17:26 schrieb Robert Goulet:

There’s another issue in the way SDL work in Windows. When I change the
resolution to anything that is fullscreen, the vertical refresh used is
always the poorest of all. I checked my desktop properties, and it is set
to “use best refresh”. So why is it using the poorest refresh rate in
fullscreen mode in Winshit?

This is a result of the change in how refresh rates are handles under
Windows 2000 and Windows XP, previous versions of Windows had an
’optimal’ refresh rate option. This is no longer the case, so with ATi
and NVidia both and other cards under Windows 2000 and Windows XP
systems will you will have this issue. It is not a bug in the
respective drivers for those cards, but rather a change in behavior by
Microsoft. Refreshlock is the only program I have seen that works
regardless of video card and driver version and is quite configurable,
search google for it.On Mon, 2002-07-01 at 10:26, Robert Goulet wrote:

There’s another issue in the way SDL work in Windows. When I change the
resolution to anything that is fullscreen, the vertical refresh used is
always the poorest of all. I checked my desktop properties, and it is set to
"use best refresh". So why is it using the poorest refresh rate in
fullscreen mode in Win****?

thanks, boB.

I’ve updated my video driver and it fixed the problem that was causing to
not being able to switch back the the previous desktop resolution. Should be
added in some troubleshooting docs…> ----- Original Message -----

From: john@johnnypops.demon.co.uk (John Popplewell)
To:
Sent: Monday, July 01, 2002 3:10 AM
Subject: Re: [SDL] In Win32, can’t return to the original resolution after a
SDL_Quit()

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” <@Robert_Goulet>
To:
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 )


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

Right, I propose the following text:

“If you are running obsolete drivers and experiencing problems, you might
try upgrading them. Video drivers are known to have bugs, and rare as it
seems (especially when dealing with ATI and NVIDIA), they do get fixed.”

Every game released will caution you that you should be using the latest
drivers for your hardware. There’s a reason for this, and users who don’t
heed these warnings quickly discover why they exist.

I realize that in Win32 you’re going to find that most people are outright
afraid to upgrade anything, but when you’re on that platform you’re damned
if you do and damned if you don’t. The Linux user in me is almost forced
to make snide remarks about using Microsoft, but I’ll save those for
another day. ;)On Mon, Jul 01, 2002 at 12:55:29PM -0400, Robert Goulet wrote:

I’ve updated my video driver and it fixed the problem that was causing to
not being able to switch back the the previous desktop resolution. Should be
added in some troubleshooting docs…


Joseph Carter glDisable (DX8_CRAP);

heh, I never took a coding class
or a graphics class
or a software design class
and it shows :stuck_out_tongue:

-------------- next part --------------
A non-text attachment was scrubbed…
Name: not available
Type: application/pgp-signature
Size: 273 bytes
Desc: not available
URL: http://lists.libsdl.org/pipermail/sdl-libsdl.org/attachments/20020701/6656dbd2/attachment.pgp

Well, it doesn’t works for me (your minimal program)… I know that it
should. Maybe I could try updating my video driver. (I got a GF2MX400 64M).
It does the same thing in Win2000 and Win98SE.

Usually, this is a driver issue, but lots of the hardcore SDL developers
aren’t win32 users, so obvious bugs tend to creep by longer. Please let us
know if updating your drivers doesn’t help.

–ryan.