aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMax Horn2004-12-25 22:13:44 +0000
committerMax Horn2004-12-25 22:13:44 +0000
commit4a0c1b86f798a83d4c8ee48f8bf4ade3363a61a3 (patch)
tree3e73b526a83f67b4968d0ff876c6f42960b6f4fc
parentffbbef6f31dc79c8b0d08a860eb8d7ece714a62e (diff)
downloadscummvm-rg350-4a0c1b86f798a83d4c8ee48f8bf4ade3363a61a3.tar.gz
scummvm-rg350-4a0c1b86f798a83d4c8ee48f8bf4ade3363a61a3.tar.bz2
scummvm-rg350-4a0c1b86f798a83d4c8ee48f8bf4ade3363a61a3.zip
Make ESC key work in the launcher
svn-id: r16323
-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);