From 92d6ee3d7611617abfe1c4cdcf3a838116c34c95 Mon Sep 17 00:00:00 2001 From: Max Horn Date: Mon, 4 Aug 2008 17:17:37 +0000 Subject: Moved ConfMan.registerDefault calls for savepath to DefaultSaveFileManager (eventually, should be pushed into backends/platform/ code) svn-id: r33614 --- base/commandLine.cpp | 41 ----------------------------------------- 1 file changed, 41 deletions(-) (limited to 'base/commandLine.cpp') diff --git a/base/commandLine.cpp b/base/commandLine.cpp index ea0e1465b6..84f2013ae9 100644 --- a/base/commandLine.cpp +++ b/base/commandLine.cpp @@ -34,22 +34,6 @@ #include "sound/mididrv.h" -#ifdef IPHONE -#include "backends/platform/iphone/osys_iphone.h" -#endif - -#ifdef UNIX -#ifdef MACOSX -#define DEFAULT_SAVE_PATH "Documents/ScummVM Savegames" -#else -#define DEFAULT_SAVE_PATH ".scummvm" -#endif -#elif defined(__SYMBIAN32__) -#define DEFAULT_SAVE_PATH "Savegames" -#elif defined(PALMOS_MODE) -#define DEFAULT_SAVE_PATH "/PALM/Programs/ScummVM/Saved" -#endif - #define DETECTOR_TESTING_HACK namespace Base { @@ -181,9 +165,6 @@ void registerDefaults() { // Game specific ConfMan.registerDefault("path", ""); - ConfMan.registerDefault("savepath", ""); - -// ConfMan.registerDefault("amiga", false); ConfMan.registerDefault("platform", Common::kPlatformPC); ConfMan.registerDefault("language", "en"); ConfMan.registerDefault("subtitles", false); @@ -216,28 +197,6 @@ void registerDefaults() { ConfMan.registerDefault("alsa_port", "65:0"); #endif - // Register default savepath -#ifdef DEFAULT_SAVE_PATH - char savePath[MAXPATHLEN]; -#if defined(UNIX) && !defined(IPHONE) - const char *home = getenv("HOME"); - if (home && *home && strlen(home) < MAXPATHLEN) { - snprintf(savePath, MAXPATHLEN, "%s/%s", home, DEFAULT_SAVE_PATH); - ConfMan.registerDefault("savepath", savePath); - } -#elif defined(__SYMBIAN32__) - strcpy(savePath, Symbian::GetExecutablePath()); - strcat(savePath, DEFAULT_SAVE_PATH); - strcat(savePath, "\\"); - ConfMan.registerDefault("savepath", savePath); -#elif defined (IPHONE) - ConfMan.registerDefault("savepath", OSystem_IPHONE::getSavePath()); - -#elif defined(PALMOS_MODE) - ConfMan.registerDefault("savepath", DEFAULT_SAVE_PATH); -#endif -#endif // #ifdef DEFAULT_SAVE_PATH - ConfMan.registerDefault("record_mode", "none"); ConfMan.registerDefault("record_file_name", "record.bin"); ConfMan.registerDefault("record_temp_file_name", "record.tmp"); -- cgit v1.2.3 From 4e66938e8c39778422e1d6a7e17f0f1979e6e0df Mon Sep 17 00:00:00 2001 From: Torbjörn Andersson Date: Tue, 5 Aug 2008 21:43:10 +0000 Subject: Committed my patch #2026097 ("ALSA: Try both 65:0 and 17:0 by default"), with a slight modification to the README changes. (I don't know how to interpret all the output from aconnect, so I'm only documenting "the most important bit".) svn-id: r33648 --- base/commandLine.cpp | 3 --- 1 file changed, 3 deletions(-) (limited to 'base/commandLine.cpp') diff --git a/base/commandLine.cpp b/base/commandLine.cpp index 84f2013ae9..f8ca8a90cd 100644 --- a/base/commandLine.cpp +++ b/base/commandLine.cpp @@ -193,9 +193,6 @@ void registerDefaults() { ConfMan.registerDefault("joystick_num", -1); ConfMan.registerDefault("confirm_exit", false); ConfMan.registerDefault("disable_sdl_parachute", false); -#ifdef USE_ALSA - ConfMan.registerDefault("alsa_port", "65:0"); -#endif ConfMan.registerDefault("record_mode", "none"); ConfMan.registerDefault("record_file_name", "record.bin"); -- cgit v1.2.3 From 20f0bb7a40776f4ed64de29898c3939f1c13a8ba Mon Sep 17 00:00:00 2001 From: Christopher Page Date: Sat, 16 Aug 2008 02:57:30 +0000 Subject: Added documentation to the README, also added --list-saves to the HELP_STRING in commandline.cpp svn-id: r33922 --- base/commandLine.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'base/commandLine.cpp') diff --git a/base/commandLine.cpp b/base/commandLine.cpp index f8ca8a90cd..47ba3cb9ed 100644 --- a/base/commandLine.cpp +++ b/base/commandLine.cpp @@ -56,6 +56,7 @@ static const char HELP_STRING[] = " -h, --help Display a brief help text and exit\n" " -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" "\n" " -c, --config=CONFIG Use alternate configuration file\n" " -p, --path=PATH Path to where the game is installed\n" -- cgit v1.2.3 From 531bcf847ceef2b9eca82e0b3ef8473612889632 Mon Sep 17 00:00:00 2001 From: Max Horn Date: Wed, 3 Sep 2008 11:22:51 +0000 Subject: Moved FilesystemNode / FSList to namespace Common; also got rid of some 'typedef Common::String String;' name aliases svn-id: r34302 --- base/commandLine.cpp | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'base/commandLine.cpp') diff --git a/base/commandLine.cpp b/base/commandLine.cpp index 47ba3cb9ed..410777209f 100644 --- a/base/commandLine.cpp +++ b/base/commandLine.cpp @@ -365,7 +365,7 @@ Common::String parseCommandLine(Common::StringMap &settings, int argc, char **ar END_OPTION DO_OPTION('p', "path") - FilesystemNode path(option); + Common::FilesystemNode path(option); if (!path.exists()) { usage("Non-existent game path '%s'", option); } else if (!path.isReadable()) { @@ -408,7 +408,7 @@ Common::String parseCommandLine(Common::StringMap &settings, int argc, char **ar END_OPTION DO_LONG_OPTION("soundfont") - FilesystemNode path(option); + Common::FilesystemNode path(option); if (!path.exists()) { usage("Non-existent soundfont path '%s'", option); } else if (!path.isReadable()) { @@ -438,7 +438,7 @@ Common::String parseCommandLine(Common::StringMap &settings, int argc, char **ar END_OPTION DO_LONG_OPTION("savepath") - FilesystemNode path(option); + Common::FilesystemNode path(option); if (!path.exists()) { usage("Non-existent savegames path '%s'", option); } else if (!path.isWritable()) { @@ -447,7 +447,7 @@ Common::String parseCommandLine(Common::StringMap &settings, int argc, char **ar END_OPTION DO_LONG_OPTION("extrapath") - FilesystemNode path(option); + Common::FilesystemNode path(option); if (!path.exists()) { usage("Non-existent extra path '%s'", option); } else if (!path.isReadable()) { @@ -465,7 +465,7 @@ Common::String parseCommandLine(Common::StringMap &settings, int argc, char **ar END_OPTION DO_LONG_OPTION("themepath") - FilesystemNode path(option); + Common::FilesystemNode path(option); if (!path.exists()) { usage("Non-existent theme path '%s'", option); } else if (!path.isReadable()) { @@ -623,9 +623,9 @@ static void runDetectorTest() { gameid = name; } - FilesystemNode dir(path); - FSList files; - if (!dir.getChildren(files, FilesystemNode::kListAll)) { + Common::FilesystemNode dir(path); + Common::FSList files; + if (!dir.getChildren(files, Common::FilesystemNode::kListAll)) { printf(" ... invalid path, skipping\n"); continue; } @@ -736,7 +736,7 @@ bool processSettings(Common::String &command, Common::StringMap &settings) { if (!settings.contains("savepath")) { const char *dir = getenv("SCUMMVM_SAVEPATH"); if (dir && *dir && strlen(dir) < MAXPATHLEN) { - FilesystemNode saveDir(dir); + Common::FilesystemNode saveDir(dir); if (!saveDir.exists()) { warning("Non-existent SCUMMVM_SAVEPATH save path. It will be ignored."); } else if (!saveDir.isWritable()) { -- cgit v1.2.3