More event handling to help with pyinstaller compilation.

This commit is contained in:
Storm Dragon
2025-09-10 12:57:09 -04:00
parent 0190fa3a06
commit f2079261d1
4 changed files with 22 additions and 2 deletions

View File

@@ -73,6 +73,8 @@ class Sound:
if event.type == pygame.KEYDOWN and event.key in [pygame.K_ESCAPE, pygame.K_RETURN, pygame.K_SPACE]:
pygame.mixer.stop()
return None
pygame.event.pump()
pygame.event.clear()
pygame.time.delay(10)
return None
@@ -335,6 +337,8 @@ def _play_cutscene(sound, sounds=None):
if event.type == pygame.KEYDOWN and event.key in [pygame.K_ESCAPE, pygame.K_RETURN, pygame.K_SPACE]:
pygame.mixer.stop()
return None
pygame.event.pump()
pygame.event.clear()
pygame.time.delay(10)
return None