From 991d5364be542b54c5dc62be1a75cacf635c39f6 Mon Sep 17 00:00:00 2001 From: Christoph Mallon Date: Thu, 15 Mar 2012 10:40:04 +0100 Subject: COMMON: Add a space between a string literal and a macro parameter so C++11 does not think the latter is a string literal suffix. --- 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 08838167e9..d877c58718 100644 --- a/base/commandLine.cpp +++ b/base/commandLine.cpp @@ -277,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)) { \ + 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"; \ -- cgit v1.2.3 From 223794fb383637944c3b161c04ecc233a354c9ae Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Sat, 17 Mar 2012 22:02:16 +0100 Subject: ALL: Make use of defined() for the preprocessor consistent. This does not change the use of defined for some NDS source files, since they seem to be (based on?) third party code. --- base/commandLine.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'base/commandLine.cpp') diff --git a/base/commandLine.cpp b/base/commandLine.cpp index d877c58718..6407ab1c4a 100644 --- a/base/commandLine.cpp +++ b/base/commandLine.cpp @@ -68,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" @@ -155,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); @@ -557,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 -- cgit v1.2.3 From 570237ea51c9103b20516d2911632fad9330515e Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Sun, 25 Mar 2012 22:16:58 +0300 Subject: GUI: Remove leftover code for the global dithering checkbox --- base/commandLine.cpp | 1 - 1 file changed, 1 deletion(-) (limited to 'base/commandLine.cpp') diff --git a/base/commandLine.cpp b/base/commandLine.cpp index 6407ab1c4a..6fd020cb15 100644 --- a/base/commandLine.cpp +++ b/base/commandLine.cpp @@ -169,7 +169,6 @@ void registerDefaults() { // Graphics ConfMan.registerDefault("fullscreen", false); ConfMan.registerDefault("aspect_ratio", false); - ConfMan.registerDefault("disable_dithering", false); ConfMan.registerDefault("gfx_mode", "normal"); ConfMan.registerDefault("render_mode", "default"); ConfMan.registerDefault("desired_screen_aspect_ratio", "auto"); -- cgit v1.2.3 From e2056bdfd93ba247c819ec3fd2f0b487dde05709 Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Fri, 29 Jun 2012 16:09:28 +0200 Subject: GUI: Remember last save/load chooser selection. --- base/commandLine.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'base/commandLine.cpp') diff --git a/base/commandLine.cpp b/base/commandLine.cpp index 6fd020cb15..5ad23313dc 100644 --- a/base/commandLine.cpp +++ b/base/commandLine.cpp @@ -237,6 +237,8 @@ void registerDefaults() { ConfMan.registerDefault("record_temp_file_name", "record.tmp"); ConfMan.registerDefault("record_time_file_name", "record.time"); + ConfMan.registerDefault("gui_saveload_chooser", "grid"); + } // -- cgit v1.2.3 From 66fb399227acd92db3dc8d9ee193a41609cf3d39 Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Wed, 26 Sep 2012 02:11:39 +0200 Subject: GUI: Save/restore the last used page in the grid save/load dialog. This allows opening the dialog on (nearly) the same page again as when it was closed. Sadly due to the different number of entries in the save and load version this is not always exactly the same page as before. Same goes for resolution changes. Thanks to wjp for suggesting this. --- base/commandLine.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'base/commandLine.cpp') diff --git a/base/commandLine.cpp b/base/commandLine.cpp index 5ad23313dc..44007c494a 100644 --- a/base/commandLine.cpp +++ b/base/commandLine.cpp @@ -238,7 +238,7 @@ void registerDefaults() { ConfMan.registerDefault("record_time_file_name", "record.time"); ConfMan.registerDefault("gui_saveload_chooser", "grid"); - + ConfMan.registerDefault("gui_saveload_last_pos", "0"); } // -- cgit v1.2.3