Handle window close cleanly and show exit popup selection
This commit is contained in:
@ -700,7 +700,7 @@ int main(int, char **)
|
||||
SDL_Event e;
|
||||
while (SDL_PollEvent(&e))
|
||||
{
|
||||
if (e.type == SDL_EVENT_QUIT)
|
||||
if (e.type == SDL_EVENT_QUIT || e.type == SDL_EVENT_WINDOW_CLOSE_REQUESTED)
|
||||
running = false;
|
||||
else {
|
||||
// Route event to state manager handlers for per-state logic
|
||||
|
||||
Reference in New Issue
Block a user