diff options
author | James Brown | 2004-11-11 14:01:11 +0000 |
---|---|---|
committer | James Brown | 2004-11-11 14:01:11 +0000 |
commit | cb4b3c1f7ee5a56d50307e75de6462b7d259903f (patch) | |
tree | 67576ec495a32aaa3ce61514bad3b55126961cc2 /base/main.cpp | |
parent | 1f7ccd02938a1e418bf83ed44014631187df7fcb (diff) | |
download | scummvm-rg350-cb4b3c1f7ee5a56d50307e75de6462b7d259903f.tar.gz scummvm-rg350-cb4b3c1f7ee5a56d50307e75de6462b7d259903f.tar.bz2 scummvm-rg350-cb4b3c1f7ee5a56d50307e75de6462b7d259903f.zip |
Prevent infinite loop by displaying the launcher after a game start FAILURE too.
svn-id: r15787
Diffstat (limited to 'base/main.cpp')
-rw-r--r-- | base/main.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/base/main.cpp b/base/main.cpp index 435f818516..1844bbdd63 100644 --- a/base/main.cpp +++ b/base/main.cpp @@ -233,7 +233,6 @@ static int launcherDialog(GameDetector &detector, OSystem *system) { } static void runGame(GameDetector &detector, OSystem *system) { - // Set the window caption to the game name Common::String caption(ConfMan.get("description", detector._targetName)); @@ -290,6 +289,7 @@ extern "C" int main(int argc, char *argv[]) { extern "C" int scummvm_main(GameDetector &detector, int argc, char *argv[]) { #endif char *cfgFilename = NULL, *s=argv[1]; + bool running = true; #if defined(UNIX) /* On Unix, do a quick endian / alignement check before starting */ @@ -386,7 +386,7 @@ extern "C" int scummvm_main(GameDetector &detector, int argc, char *argv[]) { // FIXME: We're now looping the launcher. This, of course, doesn't // work as well as it should. In theory everything should be destroyed // cleanly, so this is now enabled to encourage people to fix bits :) - while(1) { + while(running) { // Verify the given game name is a valid supported game if (detector.detectMain()) { // Unload all plugins not needed for this game, @@ -402,9 +402,10 @@ extern "C" int scummvm_main(GameDetector &detector, int argc, char *argv[]) { ConfMan.removeKey("save_slot", ConfMan.kTransientDomain); // PluginManager::instance().unloadPlugins(); - // PluginManager::instance().loadPlugins(); - launcherDialog(detector, system); + PluginManager::instance().loadPlugins(); } + + launcherDialog(detector, system); } // ...and quit (the return 0 should never be reached) |