More event handling to help with pyinstaller compilation.
This commit is contained in:
@@ -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)
|
||||
|
Reference in New Issue
Block a user