From ca76ef4e1fa2fc9ebe0daaa2b3b6e61bed87ea14 Mon Sep 17 00:00:00 2001 From: Christopher Page Date: Tue, 20 May 2008 21:40:53 +0000 Subject: AGOS Engine: Began implementation for a new quit event which will cleanly return to the launcher. This replaces the old shutdown() method within delay() svn-id: r32203 --- engines/agos/event.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'engines/agos/event.cpp') diff --git a/engines/agos/event.cpp b/engines/agos/event.cpp index 250ff2fcfd..010b331cf8 100644 --- a/engines/agos/event.cpp +++ b/engines/agos/event.cpp @@ -142,7 +142,7 @@ bool AGOSEngine::kickoffTimeEvents() { cur_time = getTime() - _gameStoppedClock; - while ((te = _firstTimeStruct) != NULL && te->time <= cur_time) { + while ((te = _firstTimeStruct) != NULL && te->time <= cur_time && !_quit) { result = true; _pendingDeleteTimeEvent = te; invokeTimeEvent(te); @@ -521,7 +521,7 @@ void AGOSEngine::delay(uint amount) { _rightButtonDown++; break; case Common::EVENT_QUIT: - shutdown(); + _quit = true; return; default: break; @@ -544,7 +544,7 @@ void AGOSEngine::delay(uint amount) { _system->delayMillis(this_delay); cur = _system->getMillis(); - } while (cur < start + amount); + } while (cur < start + amount && !_quit); } void AGOSEngine::timer_callback() { -- cgit v1.2.3