mirror of
https://github.com/elasota/Aerofoil.git
synced 2025-12-14 12:09:36 +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 SetObjectsToDefaults (void);
|
||||||
void InitTelephone (void);
|
void InitTelephone (void);
|
||||||
void HandleTelephone (void);
|
void HandleTelephone (void);
|
||||||
|
void DoEndGame (void);
|
||||||
|
|
||||||
phoneType thePhone, theChimes;
|
phoneType thePhone, theChimes;
|
||||||
Rect glidSrcRect, justRoomsRect;
|
Rect glidSrcRect, justRoomsRect;
|
||||||
@@ -718,6 +718,10 @@ void PlayGame (void)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (quitting) {
|
||||||
|
DoEndGame();
|
||||||
|
}
|
||||||
|
|
||||||
if (gameOver)
|
if (gameOver)
|
||||||
{
|
{
|
||||||
countDown--;
|
countDown--;
|
||||||
|
|||||||
Reference in New Issue
Block a user