diff options
Diffstat (limited to 'base')
-rw-r--r-- | base/main.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/base/main.cpp b/base/main.cpp index 88d9f3bab5..bb7a17b901 100644 --- a/base/main.cpp +++ b/base/main.cpp @@ -38,6 +38,7 @@ #include "base/version.h" #include "common/config-manager.h" +#include "common/events.h" #include "common/file.h" #include "common/fs.h" #include "common/system.h" @@ -228,7 +229,8 @@ static int runGame(const EnginePlugin *plugin, OSystem &system, const Common::St // Reset the file/directory mappings Common::File::resetDefaultDirectories(); - return 0; + // If result=1 return to the launcher, else quit ScummVM + return result; } @@ -314,6 +316,10 @@ extern "C" int scummvm_main(int argc, char *argv[]) { // TODO: We should keep running if starting the selected game failed // (so instead of just quitting, show a nice error dialog to the // user and let him pick another game). + + // Reset RTL flag in case we want to load another engine + g_system->getEventManager()->resetRTL(); + if (result == 0) break; |