From 57cd60de8c7202549abf88412084dc7d8c66bdd2 Mon Sep 17 00:00:00 2001 From: Simon Pirkelmann Date: Mon, 6 Sep 2021 00:22:58 +0200 Subject: [PATCH] use KEYUP instead of KEYDOWN because otherwise switching from beamer mode does not work --- gauss-turing/webserver/gauss_turing.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gauss-turing/webserver/gauss_turing.py b/gauss-turing/webserver/gauss_turing.py index 74d26f9..d1d7fd2 100644 --- a/gauss-turing/webserver/gauss_turing.py +++ b/gauss-turing/webserver/gauss_turing.py @@ -371,7 +371,7 @@ class Game: pygame.time.wait(1500) self.state = 'reset' - pygame.display.update() + pygame.display.flip() def process_inputs(self): # proceed events @@ -400,7 +400,7 @@ class Game: self.state = 'input' elif self.state == 'input': self.state = 'running' - elif event.type == pygame.KEYDOWN: + elif event.type == pygame.KEYUP: if event.key == pygame.K_x: if not self.beamer_mode: # switch to beamer mode