From 0871d53d687eab75ac4d494a44b131d848a63537 Mon Sep 17 00:00:00 2001 From: BearOso Date: Tue, 24 Feb 2026 22:05:32 -0600 Subject: [PATCH] Prevent starvation of window state updates with Vulkan. --- SDL/SDLMain.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/SDL/SDLMain.cpp b/SDL/SDLMain.cpp index e5ac6ecb96..04c16ca7a0 100644 --- a/SDL/SDLMain.cpp +++ b/SDL/SDLMain.cpp @@ -1793,11 +1793,13 @@ int main(int argc, char *argv[]) { // input events, and so on. while (true) { SDL_Event event; - while (SDL_WaitEventTimeout(&event, 100)) { - if (g_QuitRequested || g_RestartRequested) - break; + if (SDL_WaitEventTimeout(&event, 100)) { + do { + ProcessSDLEvent(window, event, &inputTracker); - ProcessSDLEvent(window, event, &inputTracker); + if (g_QuitRequested || g_RestartRequested) + break; + } while (SDL_PollEvent(&event)); } if (g_QuitRequested || g_RestartRequested)