diff options
author | Max Horn | 2004-12-30 21:48:22 +0000 |
---|---|---|
committer | Max Horn | 2004-12-30 21:48:22 +0000 |
commit | acd1f910d5d5f8a8bbeb6fc953afdf5a1ece404c (patch) | |
tree | 2b01a2336bd1df3d1900f74c5c759179abc65db7 /common | |
parent | 75f31d28c97492fbf73826fe6eb3f600875e8ea0 (diff) | |
download | scummvm-rg350-acd1f910d5d5f8a8bbeb6fc953afdf5a1ece404c.tar.gz scummvm-rg350-acd1f910d5d5f8a8bbeb6fc953afdf5a1ece404c.tar.bz2 scummvm-rg350-acd1f910d5d5f8a8bbeb6fc953afdf5a1ece404c.zip |
Handle SCUMMVM_SAVEPATH exactly like the command line option --savepath (but the command line option has higher priority); i.e. it's affecting the config system (see also bug #1045171)
svn-id: r16391
Diffstat (limited to 'common')
-rw-r--r-- | common/savefile.cpp | 22 |
1 files changed, 8 insertions, 14 deletions
diff --git a/common/savefile.cpp b/common/savefile.cpp index 17468f6a80..fcf86308aa 100644 --- a/common/savefile.cpp +++ b/common/savefile.cpp @@ -39,21 +39,15 @@ const char *SaveFileManager::getSavePath() const { const char *dir = NULL; -#if !defined(MACOS_CARBON) && !defined(_WIN32_WCE) - dir = getenv("SCUMMVM_SAVEPATH"); -#endif - - // If SCUMMVM_SAVEPATH was not specified, try to use game specific savepath from config - if (!dir || dir[0] == 0) { + // Try to use game specific savepath from config + dir = ConfMan.get("savepath").c_str(); + + // Work around a bug (#999122) in the original 0.6.1 release of + // ScummVM, which would insert a bad savepath value into config files. + if (0 == strcmp(dir, "None")) { + ConfMan.removeKey("savepath", ConfMan.getActiveDomain()); + ConfMan.flushToDisk(); dir = ConfMan.get("savepath").c_str(); - - // Work around a bug (#999122) in the original 0.6.1 release of - // ScummVM, which would insert a bad savepath value into config files. - if (0 == strcmp(dir, "None")) { - ConfMan.removeKey("savepath", ConfMan.getActiveDomain()); - ConfMan.flushToDisk(); - dir = ConfMan.get("savepath").c_str(); - } } #ifdef _WIN32_WCE |