mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-05-02 15:53:51 +00:00
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:
parent
3667ff4998
commit
cf3fe70f1f
1 changed files with 6 additions and 0 deletions
|
|
@ -576,6 +576,12 @@ void Application::run() {
|
||||||
void Application::shutdown() {
|
void Application::shutdown() {
|
||||||
LOG_WARNING("Shutting down application...");
|
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
|
// Stop background world preloader before destroying AssetManager
|
||||||
cancelWorldPreload();
|
cancelWorldPreload();
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue