aboutsummaryrefslogtreecommitdiff
path: root/common/file.cpp
diff options
context:
space:
mode:
authorEugene Sandulenko2004-11-14 21:10:50 +0000
committerEugene Sandulenko2004-11-14 21:10:50 +0000
commit0b3949389e9f7a48023894174d5e8e19286c199a (patch)
tree5c3641c97c090e4c4ce5622495d2ab316f455a02 /common/file.cpp
parentddda67753e012a2946403933f57115b37e796bf8 (diff)
downloadscummvm-rg350-0b3949389e9f7a48023894174d5e8e19286c199a.tar.gz
scummvm-rg350-0b3949389e9f7a48023894174d5e8e19286c199a.tar.bz2
scummvm-rg350-0b3949389e9f7a48023894174d5e8e19286c199a.zip
Extend fopenNoCase with probe of capitalized files, such as Cave.mid.
svn-id: r15812
Diffstat (limited to 'common/file.cpp')
-rw-r--r--common/file.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/common/file.cpp b/common/file.cpp
index cbc2ca6e00..d943c3af2a 100644
--- a/common/file.cpp
+++ b/common/file.cpp
@@ -83,6 +83,15 @@ FILE *File::fopenNoCase(const char *filename, const char *directory, const char
file = fopen(buf, mode);
}
+ //
+ // Try again, with file name capitalized
+ //
+ if (!file) {
+ ptr = buf + offsetToFileName;
+ *ptr = toupper(*ptr);
+ file = fopen(buf, mode);
+ }
+
return file;
}