diff --git a/gametest.py b/gametest.py index bfd8ad8..6833974 100644 --- a/gametest.py +++ b/gametest.py @@ -79,6 +79,8 @@ def handle_events(): else: if event.type == pygame.QUIT or event.type == KEYDOWN: exit_application() + + time.sleep(0.1) return def exit_application(): @@ -90,11 +92,10 @@ def exit_application(): def shutdown_raspberry(): os.system("sudo shutdown -h now") return - + #signal handing for controlled exit via ctrl+c signal.signal(signal.SIGINT, signal_handler) - pygame.mouse.set_visible(False) # hide mouse screen = pygame.display.set_mode((screenSizeX, screenSizeY), pygame.FULLSCREEN)