Handle external quits while in editor

This mitigates against potential data loss after having finished editing a house.
This commit is contained in:
Phil Marell
2021-07-11 16:41:06 +10:00
parent a32b33ef1b
commit c3eb23af4b

View File

@@ -28,7 +28,7 @@ void HandleOSEvent (EventRecord *);
void HandleHighLevelEvent (EventRecord *);
void HandleIdleTask (void);
void IncrementMode (void);
void DoEndGame (void);
long lastUp, incrementModeTime;
@@ -398,6 +398,17 @@ void HandleIdleTask (void)
HandleSplashResolutionChange();
}
}
#ifndef COMPILEDEMO
if (quitting) {
if (theMode == kEditMode) {
if (!QuerySaveChanges()) {
quitting = false;
}
}
}
#endif
TickMainMenuUI();
}