Crashing with custom r_gamma causes the rest of the OS to be stuck on that gamma until you reboot
Operating system and version:
Windows 10 x64
Is this for single player or multiplayer?
Only tested in multiplayer, but probably both.
Description of the bug (and if possible, steps to reproduce the bug):
- Set
r_gamma 2or some other noticeably different number. - Crash JA through any method.
- Windows is now stuck at bright gamma until you reboot.
What did you expect to happen instead?
Windows should revert to normal desktop gamma on crash.
Not sure how you could execute code in the event that something crashed, usually by that point you've lost code execution entirely. Would have to set gamma for the OpenJK window only somehow if that were to be doable.
Use r_gammaShaders 1 which uses pixel shaders to control gamma within the window.
I won't close this issue, because there is a possibility of this being fixed if/when we attach signal handlers to cleanly shutdown and write a crash log. The issue would still exist in the edge case of the shutdown routine itself crashing :) (thus triggering the crash signal handler which calls the shutdown routine thus triggering the...)
There's already experimental OpenGL based gamma in master branch but it's not enabled by default because it has some issues. Isn't there already an issue for this?
Technically this issue isn't specific to OpenJK or JKA.
@deathsythe47 Hello there. It's actually common OpenGL issue, it probably can be fixed, but there's some solution right now can be applied:
- Razish's solution
- use
r_mapoverbrightbits 1 or 2(or whatever up to you), it's actually look much better than changing gamma - I have an application which can solve your gamma problem without Windows reboot needed, check it out oif you want: https://www.dropbox.com/s/6icc005yj0ilria/fixgamma.rar?dl=0 (also virus scan is up to you) How to use: restore your actual gamma (reboot Windows), then run
install.bat(it will save your actual gamma value to restore later on), then if your gamma appears to be broken just runfixgamma.exeand it will be fixed in a second; for this application it doesn't matter what actually cause gamma problem, it can fix everything