Ask to save game if user “externally” quits while in-game

An “external quit” being defined as one where the portability handler receives a request to quit the app, such as closing the window, or on macOS using the Quit menu item.

This can prevent the user losing their progress after having finished with a game.
This commit is contained in:
Phil Marell
2021-07-24 16:24:56 +10:00
parent b83fd1b28f
commit a32b33ef1b

View File

@@ -46,7 +46,7 @@ void HandleRoomVisitation (void);
void SetObjectsToDefaults (void);
void InitTelephone (void);
void HandleTelephone (void);
void DoEndGame (void);
phoneType thePhone, theChimes;
Rect glidSrcRect, justRoomsRect;
@@ -717,7 +717,11 @@ void PlayGame (void)
HandleDynamicScoreboard();
}
}
if (quitting) {
DoEndGame();
}
if (gameOver)
{
countDown--;