From c91a07229a8bd841e6b6e77d977254c388a2e407 Mon Sep 17 00:00:00 2001 From: Torbjörn Andersson Date: Sat, 18 Sep 2010 10:55:16 +0000 Subject: JANITORIAL: Removed most punctuation at end of warning() and error() Our warning() and error() functions always add an exclamation mark to the end of the message anyway. svn-id: r52791 --- base/commandLine.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'base/commandLine.cpp') diff --git a/base/commandLine.cpp b/base/commandLine.cpp index 2f4e78fd80..6fbdb55506 100644 --- a/base/commandLine.cpp +++ b/base/commandLine.cpp @@ -950,9 +950,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; } -- cgit v1.2.3 From 1842de4b0035854f271a40dcaa514cdba66bcf57 Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Tue, 12 Oct 2010 21:54:43 +0000 Subject: COMMON: Let --list-targets output all targets in an alphabetical list again. svn-id: r53183 --- base/commandLine.cpp | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'base/commandLine.cpp') diff --git a/base/commandLine.cpp b/base/commandLine.cpp index 6fbdb55506..5a45ed74a1 100644 --- a/base/commandLine.cpp +++ b/base/commandLine.cpp @@ -578,6 +578,10 @@ static void listTargets() { using namespace Common; const ConfigManager::DomainMap &domains = ConfMan.getGameDomains(); ConfigManager::DomainMap::const_iterator iter; + + Common::Array 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 +596,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::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. */ -- cgit v1.2.3 From c9c9eafbbb791d1b754c053aac221979a39216e1 Mon Sep 17 00:00:00 2001 From: Martin Kiewitz Date: Sun, 24 Oct 2010 18:34:08 +0000 Subject: SDL/w32: add ability to hide console feature is currently commented out - waiting till discussion has ended svn-id: r53767 --- base/commandLine.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'base/commandLine.cpp') diff --git a/base/commandLine.cpp b/base/commandLine.cpp index 5a45ed74a1..2892d31302 100644 --- a/base/commandLine.cpp +++ b/base/commandLine.cpp @@ -219,6 +219,11 @@ 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"); + +#ifdef WIN32 + // console hiding for win32 + ConfMan.registerDefault("show_console", false); +#endif } // @@ -546,6 +551,12 @@ Common::String parseCommandLine(Common::StringMap &settings, int argc, const cha END_OPTION #endif +#ifdef WIN32 + // console hiding for win32 + DO_LONG_OPTION_BOOL("show-console") + END_OPTION +#endif + unknownOption: // If we get till here, the option is unhandled and hence unknown. usage("Unrecognized option '%s'", argv[i]); -- cgit v1.2.3 From 2e0b1c621388d7b37746cf41f7d1104ac900b133 Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Sun, 24 Oct 2010 19:07:46 +0000 Subject: SDL/WIN32: Disable currently unused config entries, added with r53767. This code should be enabled, when we decide to enable m_kiewitz' code to disable the console window. Also we should add the command to the --help output etc. svn-id: r53769 --- base/commandLine.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'base/commandLine.cpp') diff --git a/base/commandLine.cpp b/base/commandLine.cpp index 2892d31302..cf59ae6dfd 100644 --- a/base/commandLine.cpp +++ b/base/commandLine.cpp @@ -220,10 +220,13 @@ void registerDefaults() { 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 } // @@ -551,11 +554,14 @@ 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. -- cgit v1.2.3