Fullscreen resolution change after switch out from SDL app(Windows)?

Hi
I use SDL 1.2.14.
I found a strange resolution change after switch out from SDL fullscreeen
app.
My desktop use 1280x1024 resolution,
and i set SDL app use 800x600.
Each time i use ctrl+alt+del,
i found resolution does not change back to 1280x1024.
It will keep at 800x600.
Even if i use ChangeDisplaySettings(),it will still go back to 800x600.
How can i make resolution change back to original resolution when i switch
out SDL fullscreen app?

PS:
Press alt+tab is ok(the resolution will go back to original resolution
1280x1024),
but ctrl+alt+del is not.–
Greets

WS Liu

What version of MS Windows? Which back-end SDL video drivers?

IIRC, past versions of MS Windows had severe bugs to this effect, or
nearly this effect.

“Fixing” such a bug implies working around it, since MS Windows cannot
easily be patched :wink:

Of course it could be a real SDL bug, or even a documentation bug in
MS Windows APIs that SDL depends upon.

Difficult to say exactly what the case is… does anyone in this part
of the SDL source code have an opinion on this kind of bug? I seem to
recall just “dealing with it” many years ago by going to my display
settings and reverting to the right video mode. Oftentimes the color
depth was changed, too.On Tue, Jun 22, 2010 at 6:40 AM, psboy <psboy.liu at gmail.com> wrote:

Hi
I use SDL 1.2.14.
I found a strange resolution change after switch out from SDL fullscreeen
app.
My desktop use 1280x1024 resolution,
and i set SDL app use 800x600.
Each time i use ctrl+alt+del,
i found resolution does not change back to 1280x1024.
It will keep at 800x600.
Even if i use?ChangeDisplaySettings(),it will still go back to 800x600.
How can i make resolution change back to original resolution when i switch
out SDL fullscreen app?
PS:
Press alt+tab is ok(the resolution will go back to original resolution
1280x1024),
but ctrl+alt+del is not.


Greets

WS Liu


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org


http://codebad.com/

I don’t think this an SDL specific problem. In fact, plenty of
commercial games have this same behavior. Especially the OpenGL ones.
I can remember all the way back in my Quake2 playing days, minimizing
the game screen would corrupt the desktop, making it impossible to
multitask.

Probably not good to obsess over this ctrl-alt-del. This is
seconds/minutes off your life, just to deal with people who want to
ctrl-alt-del in the middle of your program. Let the users figure out
its a bad idea to ctrl-alt-del.

But if you don’t mind using the win32API, there always

int GetSystemMetrics()

On loading get info about the desktop res
On exiting ,change the screen resolution to the original.

Hopefully you’ll only to need use win32 for the first half.On Tue, Jun 22, 2010 at 3:40 AM, psboy <psboy.liu at gmail.com> wrote:

Hi
I use SDL 1.2.14.
I found a strange resolution change after switch out from SDL fullscreeen
app.
My desktop use 1280x1024 resolution,
and i set SDL app use 800x600.
Each time i use ctrl+alt+del,
i found resolution does not change back to 1280x1024.
It will keep at 800x600.
Even if i use?ChangeDisplaySettings(),it will still go back to 800x600.
How can i make resolution change back to original resolution when i switch
out SDL fullscreen app?
PS:
Press alt+tab is ok(the resolution will go back to original resolution
1280x1024),
but ctrl+alt+del is not.


Greets

WS Liu


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

Hi,
I use windows 7 and SDL 1.2.14.
Where to find back-end SDL video drivers version?
I wonder how did app like kmp and mplayer video player
that can do fullscreen playing and doesn’t have this issue.
Because they use directx?
Or they just switch to the same resolution with desktop?
Even though,
i remember old game that use direct draw or direct 3D (ex:diablo 2) didn’t
find this issue…

2010/6/22 Donny Viszneki <donny.viszneki at gmail.com>> What version of MS Windows? Which back-end SDL video drivers?

IIRC, past versions of MS Windows had severe bugs to this effect, or
nearly this effect.

“Fixing” such a bug implies working around it, since MS Windows cannot
easily be patched :wink:

Of course it could be a real SDL bug, or even a documentation bug in
MS Windows APIs that SDL depends upon.

Difficult to say exactly what the case is… does anyone in this part
of the SDL source code have an opinion on this kind of bug? I seem to
recall just “dealing with it” many years ago by going to my display
settings and reverting to the right video mode. Oftentimes the color
depth was changed, too.

On Tue, Jun 22, 2010 at 6:40 AM, psboy <@psboy> wrote:

Hi
I use SDL 1.2.14.
I found a strange resolution change after switch out from SDL fullscreeen
app.
My desktop use 1280x1024 resolution,
and i set SDL app use 800x600.
Each time i use ctrl+alt+del,
i found resolution does not change back to 1280x1024.
It will keep at 800x600.
Even if i use ChangeDisplaySettings(),it will still go back to 800x600.
How can i make resolution change back to original resolution when i
switch
out SDL fullscreen app?
PS:
Press alt+tab is ok(the resolution will go back to original resolution
1280x1024),
but ctrl+alt+del is not.


Greets

WS Liu


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org


http://codebad.com/


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org


Greets

WS Liu

Hi Jeremiah,
I try a free game “League of Legends” and did not find this issue.(Seems
this game use DirectX)

Thanks you for provide me win32 API.
I have tried win32API before and found it can’t help me solve this issue.
Even i get original resolution and add code while SDL app
lose SDL_APPACTIVE,
it will change resolution to original resolution,and change back to SDL-app
specific resolution.(SDL_SetVideoMode).
Ex:
Desktop resolution is 1280x1024,SDL fullscreen app specific resolution is
800x600.
Enter SDL app,resolution change to 800x600,and press ctrl+alt+del,
SDL detect SDL_APPACTIVE lose and run ChangeDisplaySettings() code,
resolution go to 1280x1024 for a while,then resolution change back to
800x600.
So i think it maybe SDL lib problem…

2010/6/23 Jeremiah > I don’t think this an SDL specific problem. In fact, plenty of

commercial games have this same behavior. Especially the OpenGL ones.
I can remember all the way back in my Quake2 playing days, minimizing
the game screen would corrupt the desktop, making it impossible to
multitask.

Probably not good to obsess over this ctrl-alt-del. This is
seconds/minutes off your life, just to deal with people who want to
ctrl-alt-del in the middle of your program. Let the users figure out
its a bad idea to ctrl-alt-del.

But if you don’t mind using the win32API, there always

int GetSystemMetrics()

On loading get info about the desktop res
On exiting ,change the screen resolution to the original.

Hopefully you’ll only to need use win32 for the first half.

On Tue, Jun 22, 2010 at 3:40 AM, psboy <@psboy> wrote:

Hi
I use SDL 1.2.14.
I found a strange resolution change after switch out from SDL fullscreeen
app.
My desktop use 1280x1024 resolution,
and i set SDL app use 800x600.
Each time i use ctrl+alt+del,
i found resolution does not change back to 1280x1024.
It will keep at 800x600.
Even if i use ChangeDisplaySettings(),it will still go back to 800x600.
How can i make resolution change back to original resolution when i
switch
out SDL fullscreen app?
PS:
Press alt+tab is ok(the resolution will go back to original resolution
1280x1024),
but ctrl+alt+del is not.


Greets

WS Liu


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org


Greets

WS Liu