mirror of
https://github.com/elasota/Aerofoil.git
synced 2025-09-23 06:53:43 +00:00
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:
@@ -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--;
|
||||
|
Reference in New Issue
Block a user