diff options
Diffstat (limited to 'base/commandLine.cpp')
-rw-r--r-- | base/commandLine.cpp | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/base/commandLine.cpp b/base/commandLine.cpp index c3059ced2f..6407ab1c4a 100644 --- a/base/commandLine.cpp +++ b/base/commandLine.cpp @@ -33,9 +33,10 @@ #include "base/version.h" #include "common/config-manager.h" +#include "common/fs.h" +#include "common/rendermode.h" #include "common/system.h" #include "common/textconsole.h" -#include "common/fs.h" #include "gui/ThemeEngine.h" @@ -67,7 +68,7 @@ static const char HELP_STRING[] = " -z, --list-games Display list of supported games and exit\n" " -t, --list-targets Display list of configured targets and exit\n" " --list-saves=TARGET Display a list of savegames for the game (TARGET) specified\n" -#if defined (WIN32) && !defined(_WIN32_WCE) && !defined(__SYMBIAN32__) +#if defined(WIN32) && !defined(_WIN32_WCE) && !defined(__SYMBIAN32__) " --console Enable the console window (default:enabled)\n" #endif "\n" @@ -154,7 +155,7 @@ static void usage(const char *s, ...) { vsnprintf(buf, STRINGBUFLEN, s, va); va_end(va); -#if !(defined(__GP32__) || defined (__SYMBIAN32__) || defined(__DS__)) +#if !(defined(__GP32__) || defined(__SYMBIAN32__) || defined(__DS__)) printf(USAGE_STRING, s_appName, buf, s_appName, s_appName); #endif exit(1); @@ -276,12 +277,12 @@ void registerDefaults() { // Use this for boolean options; this distinguishes between "-x" and "-X", // resp. between "--some-option" and "--no-some-option". #define DO_OPTION_BOOL(shortCmd, longCmd) \ - if (isLongCmd ? (!strcmp(s+2, longCmd) || !strcmp(s+2, "no-"longCmd)) : (tolower(s[1]) == shortCmd)) { \ - bool boolValue = (islower(static_cast<unsigned char>(s[1])) != 0); \ + if (isLongCmd ? (!strcmp(s+2, longCmd) || !strcmp(s+2, "no-" longCmd)) : (tolower(s[1]) == shortCmd)) { \ + bool boolValue = (Common::isLower(s[1]) != 0); \ s += 2; \ if (isLongCmd) { \ boolValue = !strcmp(s, longCmd); \ - s += boolValue ? (sizeof(longCmd) - 1) : (sizeof("no-"longCmd) - 1); \ + s += boolValue ? (sizeof(longCmd) - 1) : (sizeof("no-" longCmd) - 1); \ } \ if (*s != '\0') goto unknownOption; \ const char *option = boolValue ? "true" : "false"; \ @@ -556,7 +557,7 @@ Common::String parseCommandLine(Common::StringMap &settings, int argc, const cha END_OPTION #endif -#if defined (WIN32) && !defined(_WIN32_WCE) && !defined(__SYMBIAN32__) +#if defined(WIN32) && !defined(_WIN32_WCE) && !defined(__SYMBIAN32__) // Optional console window on Windows (default: enabled) DO_LONG_OPTION_BOOL("console") END_OPTION |