From 81ff879a9daf101a51be72c838ca6885f93746d9 Mon Sep 17 00:00:00 2001 From: Max Horn Date: Thu, 29 Jan 2004 21:54:03 +0000 Subject: Add the super-ultra-mega-secret --savepath option (and it's not just secret because I am too lame to write a help entry, add it to the README, and add it to the TeX files. *cough* No, that's not at all the reason... :-) svn-id: r12669 --- base/engine.cpp | 4 +--- base/gameDetector.cpp | 6 ++++++ 2 files changed, 7 insertions(+), 3 deletions(-) (limited to 'base') diff --git a/base/engine.cpp b/base/engine.cpp index 7660fbcfd4..d791ffe50c 100644 --- a/base/engine.cpp +++ b/base/engine.cpp @@ -70,9 +70,7 @@ const char *Engine::getSavePath() const { if (!dir || dir[0] == 0) dir = ConfMan.get("savepath").c_str(); - // If no save path was specified, use no directory prefix - if (dir == NULL) - dir = ""; + assert(dir); return dir; #endif diff --git a/base/gameDetector.cpp b/base/gameDetector.cpp index ffb02072a5..e59727d45d 100644 --- a/base/gameDetector.cpp +++ b/base/gameDetector.cpp @@ -117,6 +117,7 @@ GameDetector::GameDetector() { // Game specifc ConfMan.registerDefault("path", ""); + ConfMan.registerDefault("savepath", ""); // ConfMan.registerDefault("amiga", false); ConfMan.registerDefault("platform", Common::kPlatformPC); @@ -405,6 +406,11 @@ void GameDetector::parseCommandLine(int argc, char **argv) { ConfMan.set("aspect_ratio", cmdValue, kTransientDomain); END_OPTION + DO_LONG_OPTION("savepath") + // TODO: Verify whether the path is valid + ConfMan.set("savepath", option, kTransientDomain); + END_OPTION + #ifndef DISABLE_SCUMM DO_LONG_OPTION("tempo") // Use the special value '0' for the base in (int)strtol. -- cgit v1.2.3