Skip to content

Commit

Permalink
Update set_timer patch
Browse files Browse the repository at this point in the history
  • Loading branch information
e-dong committed Feb 22, 2024
1 parent 258e49c commit ae23564
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion platform_wasm/pygame/timer.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,12 @@ async def fire_event(thread_uuid):
loop_counter = 0
while True:
await asyncio.sleep(dlay)
if event_loop.is_closed() or event not in THREADS or THREADS[event] != thread_uuid or (loops and loop_counter >= loops):
if (
event_loop.is_closed()
or event not in THREADS
or THREADS[event] != thread_uuid
or (loops and loop_counter >= loops)
):
break

pygame.event.post(cevent)
Expand Down

0 comments on commit ae23564

Please sign in to comment.