Proper cleanup on user requested exit (#624)

This commit is contained in:
Christian Semmler 2025-07-18 14:40:25 -07:00 committed by GitHub
parent 556b2deef2
commit 38213275cf
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -488,6 +488,7 @@ SDL_AppResult SDL_AppEvent(void* appstate, SDL_Event* event)
}
break;
case SDL_EVENT_WINDOW_CLOSE_REQUESTED:
case SDL_EVENT_QUIT:
if (!g_closed) {
delete g_isle;
g_isle = NULL;
@ -767,9 +768,6 @@ SDL_AppResult SDL_AppEvent(void* appstate, SDL_Event* event)
}
break;
}
case SDL_EVENT_QUIT:
return SDL_APP_SUCCESS;
break;
}
if (event->user.type == g_legoSdlEvents.m_windowsMessage) {