aboutsummaryrefslogtreecommitdiff
path: root/base/main.cpp
diff options
context:
space:
mode:
authorMax Horn2004-12-25 22:13:44 +0000
committerMax Horn2004-12-25 22:13:44 +0000
commit4a0c1b86f798a83d4c8ee48f8bf4ade3363a61a3 (patch)
tree3e73b526a83f67b4968d0ff876c6f42960b6f4fc /base/main.cpp
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
Diffstat (limited to 'base/main.cpp')
-rw-r--r--base/main.cpp8
1 files changed, 4 insertions, 4 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)