aboutsummaryrefslogtreecommitdiff
path: root/base
diff options
context:
space:
mode:
authorEugene Sandulenko2006-03-25 04:17:17 +0000
committerEugene Sandulenko2006-03-25 04:17:17 +0000
commit22042bc63741321557b401833adf9d2ccf10eb3b (patch)
tree5122e534a141c37092e8f583bb33669c49e434e8 /base
parent3331de7105fe8ece9268ad0bc9123dba01a33a2b (diff)
downloadscummvm-rg350-22042bc63741321557b401833adf9d2ccf10eb3b.tar.gz
scummvm-rg350-22042bc63741321557b401833adf9d2ccf10eb3b.tar.bz2
scummvm-rg350-22042bc63741321557b401833adf9d2ccf10eb3b.zip
- Implemented case insensitive file reading. Left old system as a fallback
in case some engine writer decide to do something unwise - Removed used of ConfMan.getKey("path") in file-related cases, because now File class handles that - Fixed bug in ScummEngine_v80he::o80_getFileSize() where path delimiters weren't translated svn-id: r21443
Diffstat (limited to 'base')
-rw-r--r--base/main.cpp13
1 files changed, 11 insertions, 2 deletions
diff --git a/base/main.cpp b/base/main.cpp
index b2f32edb1e..dba2eeacb7 100644
--- a/base/main.cpp
+++ b/base/main.cpp
@@ -276,6 +276,10 @@ static bool launcherDialog(GameDetector &detector, OSystem &system) {
}
static int runGame(GameDetector &detector, OSystem &system, const Common::String &edebuglevels) {
+ // We add it here, so MD5-based detection will be able to
+ // read mixed case files
+ Common::File::addDefaultDirectory(ConfMan.get("path"));
+
// Create the game engine
Engine *engine = detector.createEngine(&system);
if (!engine) {
@@ -301,12 +305,17 @@ static int runGame(GameDetector &detector, OSystem &system, const Common::String
system.setWindowCaption(caption.c_str());
}
+ Common::File::addDefaultDirectoryRecursive(ConfMan.get("path"));
+
// Add extrapath (if any) to the directory search list
if (ConfMan.hasKey("extrapath"))
- Common::File::addDefaultDirectory(ConfMan.get("extrapath"));
+ Common::File::addDefaultDirectoryRecursive(ConfMan.get("extrapath"));
if (ConfMan.hasKey("extrapath", Common::ConfigManager::kApplicationDomain))
- Common::File::addDefaultDirectory(ConfMan.get("extrapath", Common::ConfigManager::kApplicationDomain));
+ Common::File::addDefaultDirectoryRecursive(ConfMan.get("extrapath", Common::ConfigManager::kApplicationDomain));
+
+ // As a last resort add current directory and lock further additions
+ Common::File::addDefaultDirectory(".", true);
int result;