-1

I have an event loop like

while True:
    for event in pygame.event.get():

My code only seems to run while my mouse is moving and for a short while after it stops.

I want it to not freeze whatever happens but to also have event available to use in my code further down. Is there a way to do this?

Oliver Nicholls
  • 176
  • 2
  • 15
  • 1
    Most likely you draw the scene and update the display in the event loop rather than the application loop. If this is not the case, then you have more than one event loop. – Rabbid76 Jan 04 '21 at 19:08
  • @Rabbid76 How do you run multiple loops at the same time? – Oliver Nicholls Jan 04 '21 at 19:52
  • You cannot. However, see [How to run multiple while loops at a time in Python](https://stackoverflow.com/questions/65263318/how-to-run-multiple-while-loops-at-a-time-in-python/65263396#65263396) – Rabbid76 Jan 04 '21 at 21:08

0 Answers0