fix: hide window on shutdown to prevent OS force-close dialog

SDL_HideWindow immediately on shutdown so the OS doesn't show a
"not responding" dialog during the slow cleanup process.
This commit is contained in:
Kelsi 2026-03-17 09:04:47 -07:00
parent 3667ff4998
commit cf3fe70f1f

View file

@ -576,6 +576,12 @@ void Application::run() {
void Application::shutdown() {
LOG_WARNING("Shutting down application...");
// Hide the window immediately so the OS doesn't think the app is frozen
// during the (potentially slow) resource cleanup below.
if (window && window->getSDLWindow()) {
SDL_HideWindow(window->getSDLWindow());
}
// Stop background world preloader before destroying AssetManager
cancelWorldPreload();