From 12f69e3c6c6217477637a94372884fd4812a8b68 Mon Sep 17 00:00:00 2001 From: Clownacy Date: Thu, 5 Sep 2019 21:07:30 +0000 Subject: [PATCH] Fix idling hogging 100% of a CPU core This was me not converting the WinAPI code properly. Stupid me. --- src/Main.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/Main.cpp b/src/Main.cpp index 204a57b4..705e238a 100644 --- a/src/Main.cpp +++ b/src/Main.cpp @@ -364,9 +364,13 @@ void JoystickProc(void); BOOL SystemTask(void) { - SDL_Event event; - while (SDL_PollEvent(&event) || !bActive) + while (SDL_PollEvent(NULL) || !bActive) { + SDL_Event event; + + if (!SDL_WaitEvent(&event)) + return FALSE; + switch (event.type) { case SDL_KEYDOWN: