ref: 12f69e3c6c6217477637a94372884fd4812a8b68
parent: 1b8fbcee431fc381847ea402ac09f423cbc163c6
author: Clownacy <Clownacy@users.noreply.github.com>
date: Thu Sep 5 17:07:30 EDT 2019
Fix idling hogging 100% of a CPU core This was me not converting the WinAPI code properly. Stupid me.
--- a/src/Main.cpp
+++ b/src/Main.cpp
@@ -364,9 +364,13 @@
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:
--
⑨