Skip to content

Commit

Permalink
Prevent frozen app from closing immediately when limited gamma range …
Browse files Browse the repository at this point in the history
…is detected
  • Loading branch information
dev7355608 committed Sep 22, 2017
1 parent 92c1a92 commit a8de063
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion app.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,12 @@ def exit_handler():

atexit.register(exit_handler)

def exit(*args, **kwargs):
excepthook.exception = True
sys.exit(*args, **kwargs)
else:
exit = sys.exit

if platform.system() == 'Windows':
import win32console, win32gui, win32con

Expand Down Expand Up @@ -161,7 +167,7 @@ def extract(data, *keys, default=None):
print('Gamma range is currently limited. To fix that, please\n'
' (1) run set_max_gamma_range.reg, then\n'
' (2) reboot PC for it to take effect!')
sys.exit()
exit()


print("Don't forget to set the launch option -nogammaramp!\n")
Expand Down

0 comments on commit a8de063

Please sign in to comment.