OpenJK icon indicating copy to clipboard operation
OpenJK copied to clipboard

Crashing with custom r_gamma causes the rest of the OS to be stuck on that gamma until you reboot

Open deathsythe47 opened this issue 9 years ago • 5 comments

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):

  1. Set r_gamma 2 or some other noticeably different number.
  2. Crash JA through any method.
  3. 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.

deathsythe47 avatar Aug 09 '16 01:08 deathsythe47

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.

shinyquagsire23 avatar Aug 09 '16 03:08 shinyquagsire23

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...)

Razish avatar Aug 09 '16 05:08 Razish

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?

ensiform avatar Aug 09 '16 05:08 ensiform

Technically this issue isn't specific to OpenJK or JKA.

ensiform avatar Oct 01 '16 00:10 ensiform

@deathsythe47 Hello there. It's actually common OpenGL issue, it probably can be fixed, but there's some solution right now can be applied:

  1. Razish's solution
  2. use r_mapoverbrightbits 1 or 2 (or whatever up to you), it's actually look much better than changing gamma
  3. 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 run fixgamma.exe and it will be fixed in a second; for this application it doesn't matter what actually cause gamma problem, it can fix everything

sudge avatar Oct 16 '16 05:10 sudge