Reset to screen settings after a crash - how?

Advanced OpenGL source port fork from ZDoom, picking up where ZDoomGL left off.
[Home] [Download] [Git builds (Win)] [Git builds (Mac)] [Wiki] [Repo] [Bugs&Suggestions]

Moderator: Graf Zahl

Locked
User avatar
Enjay
Developer
Developer
Posts: 4748
Joined: Tue Aug 30, 2005 23:19
Location: Scotland
Contact:

Reset to screen settings after a crash - how?

Post by Enjay »

I just wondered if anyone knows of a way of resetting the screen after an OpenGL application crashes?

You know the problem - you're using an OpenGL app and it exits unexpectedly. You get dumped to the desktop but your resolution and/or gamma settings are likely to be messed up. Restarting the computer will set things right again, but sometimes it's not convenient to do that right away. So, does anyone know of any "soft" way of doing it?

Not GZdoom specific, I know, but that's the prog it happened most recently with for me.
User avatar
chopkinsca
Posts: 183
Joined: Thu Dec 29, 2005 8:09

Post by chopkinsca »

My card software has an option for adjusting the gamma/brightness/contrast and has hotkeys for doing so. When ever the screen isn't it's proper gamma I can just use the hotkeys to reset it. I have an ATI card, so not sure if you have the same. Resolution is easy to fix just by changing resolution (which there might be hotkeys for).
User avatar
Nash
Developer
Developer
Posts: 1226
Joined: Sun Sep 25, 2005 1:49
Location: Kuala Lumpur, Malaysia
Contact:

Post by Nash »

If you're using nVidia graphic cards, you can check out the Desktop Management features it has by enabling the nView Desktop Manager features (be sure to switch to Classic View first because the new GUI is a load of crap).

It also has hotkey support, and you can tell the hotkey to activate a profile, which is most probably what you want. Save your custom profile, and when GZDoom hangs, just hit the hotkey.

EDIT: Be warned though that while this may fix your resolution problems, in some cases it might not fix your brightness or gamma. When Doom 3 crashed unexpectedly for me the other day, it would get stuck with Doom 3's colour settings eventhough my nVidia settings are all apparently at default. I had no other choice but to restart.
User avatar
Cutmanmike
Posts: 482
Joined: Sat Sep 03, 2005 23:34

Post by Cutmanmike »

The way I do it is by going to display options and previewing a different resolution and back.
User avatar
Enjay
Developer
Developer
Posts: 4748
Joined: Tue Aug 30, 2005 23:19
Location: Scotland
Contact:

Post by Enjay »

I'll look into my settings. However, for me the problem is usually the gamma, rather than the resolution, because I tend to run games at the same res as my desktop.
User avatar
Shinjanji
Posts: 198
Joined: Sun Nov 06, 2005 16:45
Location: Pennsylvania, USA

Post by Shinjanji »

This is what I use:

http://cwdohnal.home.mindspring.com/setgamma/

Just setgamma -reset and done ;)
User avatar
Enjay
Developer
Developer
Posts: 4748
Joined: Tue Aug 30, 2005 23:19
Location: Scotland
Contact:

Post by Enjay »

Hey thanks. That seems to work. Unfortunately, kind of, I'm having difficulty getting an OpenGL program to crash ATM to test it properly.
User avatar
Shinjanji
Posts: 198
Joined: Sun Nov 06, 2005 16:45
Location: Pennsylvania, USA

Post by Shinjanji »

Enjay wrote:Hey thanks. That seems to work. Unfortunately, kind of, I'm having difficulty getting an OpenGL program to crash ATM to test it properly.
Know of anything offhand that causes a guarunteed crash in an older version of GZDoom?
User avatar
Jive
Posts: 340
Joined: Sat Mar 11, 2006 23:44
Location: Manaus (Amazonia)
Contact:

Post by Jive »

yes: launch a saved game on an altered version of a pwad without having built again the glnodes. If you build again the glnodes, Gzdoom will simply advise you that it was expecting a name but found something else, but it won't crash.
User avatar
Graf Zahl
GZDoom Developer
GZDoom Developer
Posts: 7148
Joined: Wed Jul 20, 2005 9:48
Location: Germany
Contact:

Post by Graf Zahl »

Much easier:

Type 'crashout' in the console and you get a nice access violation.
User avatar
Nash
Developer
Developer
Posts: 1226
Joined: Sun Sep 25, 2005 1:49
Location: Kuala Lumpur, Malaysia
Contact:

Post by Nash »

But that's a "proper" way of crashing GZDoom... the program handles it.

We're talking about the generic unexpected Microsoft-style crash... the kind where the display mode won't be reset back to normal, and everything that the program is supposed to do when it closes normally does not happen.
User avatar
Enjay
Developer
Developer
Posts: 4748
Joined: Tue Aug 30, 2005 23:19
Location: Scotland
Contact:

Post by Enjay »

Actually, crashout did it just fine. It left me at the desktop with my gamma settings too high and setgamma fixed them. Thanks all. :D
User avatar
Nash
Developer
Developer
Posts: 1226
Joined: Sun Sep 25, 2005 1:49
Location: Kuala Lumpur, Malaysia
Contact:

Post by Nash »

That's weird. crashout perfectly resets the gamma and brightness settings for me. o_O
Locked

Return to “GZDoom”