SAGA2: Remove timer callback on cleanup

This commit is contained in:
a/ 2021-08-21 01:48:48 +09:00
parent 21316cc286
commit 0c43f21c80
3 changed files with 5 additions and 3 deletions

View file

@ -124,9 +124,6 @@ void initTimer(void);
void saveTimer(Common::OutSaveFile *out);
void loadTimer(Common::InSaveFile *in);
// Cleanup the timer -- nothing to do
inline void cleanupTimer(void) {}
void pauseTimer(void); // pause game clock
void resumeTimer(void); // resume game clock

View file

@ -76,6 +76,10 @@ void loadTimer(Common::InSaveFile *in) {
debugC(3, kDebugSaveload, "... time = %d", gameTime);
}
void cleanupTimer() {
g_vm->getTimerManager()->removeTimerProc(&timerCallback);
}
/* ====================================================================== *
Alarms
* ====================================================================== */

View file

@ -48,6 +48,7 @@ void checkTimers(void);
void initTimers(void);
void saveTimers(Common::OutSaveFile *outS);
void loadTimers(Common::InSaveFile *in);
void cleanupTimer();
// Cleanup the active Timers
void cleanupTimers(void);