aboutsummaryrefslogtreecommitdiff
path: root/base/commandLine.cpp
diff options
context:
space:
mode:
authorYotam Barnoy2010-10-31 11:08:43 +0000
committerYotam Barnoy2010-10-31 11:08:43 +0000
commit94c8d0a14df429a1b25bd9f5c5d75497fd0ddbd1 (patch)
tree3df2a4ae7967c56d464729669fc06ce4e93dff36 /base/commandLine.cpp
parent8df4278ba8cfbf71228e1927f9db635a9a30a57f (diff)
parentdca3c8d8bfc6c4db38cf8e8291818dd472041d4e (diff)
downloadscummvm-rg350-94c8d0a14df429a1b25bd9f5c5d75497fd0ddbd1.tar.gz
scummvm-rg350-94c8d0a14df429a1b25bd9f5c5d75497fd0ddbd1.tar.bz2
scummvm-rg350-94c8d0a14df429a1b25bd9f5c5d75497fd0ddbd1.zip
Updated with latest from trunk
svn-id: r53976
Diffstat (limited to 'base/commandLine.cpp')
-rw-r--r--base/commandLine.cpp33
1 files changed, 29 insertions, 4 deletions
diff --git a/base/commandLine.cpp b/base/commandLine.cpp
index 2f4e78fd80..cf59ae6dfd 100644
--- a/base/commandLine.cpp
+++ b/base/commandLine.cpp
@@ -219,6 +219,14 @@ void registerDefaults() {
ConfMan.registerDefault("record_file_name", "record.bin");
ConfMan.registerDefault("record_temp_file_name", "record.tmp");
ConfMan.registerDefault("record_time_file_name", "record.time");
+
+#if 0
+ // NEW CODE TO HIDE CONSOLE FOR WIN32
+#ifdef WIN32
+ // console hiding for win32
+ ConfMan.registerDefault("show_console", false);
+#endif
+#endif
}
//
@@ -546,6 +554,15 @@ Common::String parseCommandLine(Common::StringMap &settings, int argc, const cha
END_OPTION
#endif
+#if 0
+ // NEW CODE TO HIDE CONSOLE FOR WIN32
+#ifdef WIN32
+ // console hiding for win32
+ DO_LONG_OPTION_BOOL("show-console")
+ END_OPTION
+#endif
+#endif
+
unknownOption:
// If we get till here, the option is unhandled and hence unknown.
usage("Unrecognized option '%s'", argv[i]);
@@ -578,6 +595,10 @@ static void listTargets() {
using namespace Common;
const ConfigManager::DomainMap &domains = ConfMan.getGameDomains();
ConfigManager::DomainMap::const_iterator iter;
+
+ Common::Array<Common::String> targets;
+ targets.reserve(domains.size());
+
for (iter = domains.begin(); iter != domains.end(); ++iter) {
Common::String name(iter->_key);
Common::String description(iter->_value.getVal("description"));
@@ -592,9 +613,13 @@ static void listTargets() {
description = g.description();
}
- printf("%-20s %s\n", name.c_str(), description.c_str());
-
+ targets.push_back(Common::String::printf("%-20s %s", name.c_str(), description.c_str()));
}
+
+ Common::sort(targets.begin(), targets.end());
+
+ for (Common::Array<Common::String>::const_iterator i = targets.begin(), end = targets.end(); i != end; ++i)
+ printf("%s\n", i->c_str());
}
/** List all saves states for the given target. */
@@ -950,9 +975,9 @@ Common::Error processSettings(Common::String &command, Common::StringMap &settin
if (dir && *dir && strlen(dir) < MAXPATHLEN) {
Common::FSNode saveDir(dir);
if (!saveDir.exists()) {
- warning("Non-existent SCUMMVM_SAVEPATH save path. It will be ignored.");
+ warning("Non-existent SCUMMVM_SAVEPATH save path. It will be ignored");
} else if (!saveDir.isWritable()) {
- warning("Non-writable SCUMMVM_SAVEPATH save path. It will be ignored.");
+ warning("Non-writable SCUMMVM_SAVEPATH save path. It will be ignored");
} else {
settings["savepath"] = dir;
}