diff --git a/SDL/SDLMain.cpp b/SDL/SDLMain.cpp index 599080cac1..ed43e56c62 100644 --- a/SDL/SDLMain.cpp +++ b/SDL/SDLMain.cpp @@ -1797,8 +1797,12 @@ int main(int argc, char *argv[]) { while (true) { SDL_Event event; while (SDL_WaitEventTimeout(&event, 100)) { + if (g_QuitRequested || g_RestartRequested) + break; + ProcessSDLEvent(window, event, &inputTracker); } + if (g_QuitRequested || g_RestartRequested) break;