mirror of
https://github.com/EyeTrackVR/EyeTrackVR.git
synced 2025-09-26 23:09:28 +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()
|
||||
|
||||
if eventg == sg.WINDOW_CLOSED:
|
||||
config.settings.gui_disable_gui = False
|
||||
config.save()
|
||||
break
|
||||
elif eventg == 'Enable GUI':
|
||||
config.settings.gui_disable_gui = False
|
||||
@ -309,15 +311,12 @@ def main():
|
||||
print('GUI Enabled')
|
||||
|
||||
break
|
||||
|
||||
# Close the window
|
||||
windowg.close()
|
||||
print('close')
|
||||
|
||||
|
||||
# First off, check for any events from the GUI
|
||||
window = create_window(config, settings, eyes)
|
||||
print('new window')
|
||||
while True:
|
||||
event, values = window.read(timeout=1) # this higher timeout saves some cpu usage
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user