From 6d9237509365f5d385e9c3fd80d44cac0bccfffe Mon Sep 17 00:00:00 2001 From: Chris Apers Date: Tue, 22 Jul 2003 08:33:13 +0000 Subject: Fix for bug #775512 svn-id: r9117 --- gui/newgui.cpp | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) (limited to 'gui') diff --git a/gui/newgui.cpp b/gui/newgui.cpp index dc2a7fae17..90df0c978b 100644 --- a/gui/newgui.cpp +++ b/gui/newgui.cpp @@ -23,6 +23,9 @@ #include "newgui.h" #include "dialog.h" +#ifdef __PALM_OS__ +# include "palm.h" +#endif #ifdef _MSC_VER # pragma warning( disable : 4068 ) // unknown pragma @@ -118,7 +121,15 @@ void NewGui::runLoop() { } while (!_dialogStack.empty() && activeDialog == _dialogStack.top()) { - +#ifdef __PALM_OS__ + // There is no exit(.) function under PalmOS, to exit an app + // we need to send an 'exit' event to the event handler + // and then the system return to the launcher. But this event + // is not handled by the following loop and so we need to force exit. + // In other systems like Windows ScummVM exit immediatly and so this doesn't appear. + if (((OSystem_PALMOS *)_system)->_quit) + return; +#endif activeDialog->handleTickle(); if (_needRedraw) { @@ -528,4 +539,3 @@ void NewGui_initGlobals() { } void NewGui_releaseGlobals(){ GRELEASEPTR(GBVARS_GUIFONT_INDEX, GBVARS_SCUMM) } #endif - -- cgit v1.2.3