aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--base/main.cpp8
-rw-r--r--gui/launcher.cpp2
2 files changed, 5 insertions, 5 deletions
diff --git a/base/main.cpp b/base/main.cpp
index afb70ad923..432e967c97 100644
--- a/base/main.cpp
+++ b/base/main.cpp
@@ -184,7 +184,7 @@ static void do_memory_test(void) {
#endif
-static int launcherDialog(GameDetector &detector, OSystem *system) {
+static bool launcherDialog(GameDetector &detector, OSystem *system) {
system->beginGFXTransaction();
// Set the user specified graphics mode (if any).
@@ -232,7 +232,7 @@ static int launcherDialog(GameDetector &detector, OSystem *system) {
#else
GUI::LauncherDialog dlg(detector);
#endif
- return dlg.runModal();
+ return (dlg.runModal() != -1);
}
static int runGame(GameDetector &detector, OSystem *system) {
@@ -377,7 +377,7 @@ extern "C" int scummvm_main(GameDetector &detector, int argc, char *argv[]) {
// Unless a game was specified, show the launcher dialog
if (detector._targetName.isEmpty())
- launcherDialog(detector, system);
+ running = launcherDialog(detector, system);
// FIXME: We're now looping the launcher. This, of course, doesn't
// work as well as it should. In theory everything should be destroyed
@@ -403,7 +403,7 @@ extern "C" int scummvm_main(GameDetector &detector, int argc, char *argv[]) {
PluginManager::instance().loadPlugins();
}
- launcherDialog(detector, system);
+ running = launcherDialog(detector, system);
}
// ...and quit (the return 0 should never be reached)
diff --git a/gui/launcher.cpp b/gui/launcher.cpp
index 0e5b6c2703..37e399436a 100644
--- a/gui/launcher.cpp
+++ b/gui/launcher.cpp
@@ -673,8 +673,8 @@ void LauncherDialog::handleCommand(CommandSender *sender, uint32 cmd, uint32 dat
updateButtons();
break;
case kQuitCmd:
+ setResult(-1);
close();
- g_system->quit();
break;
default:
Dialog::handleCommand(sender, cmd, data);