mirror of
https://github.com/EyeTrackVR/EyeTrackVR.git
synced 2025-11-04 14:39:42 +08:00
feat: no gui mode fix window close bug
This commit is contained in:
parent
bbd7c9d4d5
commit
2938c49b63
@ -302,6 +302,8 @@ def main():
|
|||||||
eventg, valuesg = windowg.read()
|
eventg, valuesg = windowg.read()
|
||||||
|
|
||||||
if eventg == sg.WINDOW_CLOSED:
|
if eventg == sg.WINDOW_CLOSED:
|
||||||
|
config.settings.gui_disable_gui = False
|
||||||
|
config.save()
|
||||||
break
|
break
|
||||||
elif eventg == 'Enable GUI':
|
elif eventg == 'Enable GUI':
|
||||||
config.settings.gui_disable_gui = False
|
config.settings.gui_disable_gui = False
|
||||||
@ -309,15 +311,12 @@ def main():
|
|||||||
print('GUI Enabled')
|
print('GUI Enabled')
|
||||||
|
|
||||||
break
|
break
|
||||||
|
|
||||||
# Close the window
|
# Close the window
|
||||||
windowg.close()
|
windowg.close()
|
||||||
print('close')
|
|
||||||
|
|
||||||
|
|
||||||
# First off, check for any events from the GUI
|
# First off, check for any events from the GUI
|
||||||
window = create_window(config, settings, eyes)
|
window = create_window(config, settings, eyes)
|
||||||
print('new window')
|
|
||||||
while True:
|
while True:
|
||||||
event, values = window.read(timeout=1) # this higher timeout saves some cpu usage
|
event, values = window.read(timeout=1) # this higher timeout saves some cpu usage
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user