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

@@ -177,6 +177,9 @@ def display_text(text):
currentIndex = 0
speech.speak(navText[currentIndex])
# Clear any pending events
pygame.event.clear()
while True:
event = pygame.event.wait()
@@ -230,5 +233,6 @@ def display_text(text):
except:
speech.speak("Failed to copy the text to the clipboard.")
event = pygame.event.clear()
pygame.event.pump()
pygame.event.clear()
time.sleep(0.001)