diff options
author | Eugene Sandulenko | 2004-11-14 21:10:50 +0000 |
---|---|---|
committer | Eugene Sandulenko | 2004-11-14 21:10:50 +0000 |
commit | 0b3949389e9f7a48023894174d5e8e19286c199a (patch) | |
tree | 5c3641c97c090e4c4ce5622495d2ab316f455a02 | |
parent | ddda67753e012a2946403933f57115b37e796bf8 (diff) | |
download | scummvm-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
-rw-r--r-- | common/file.cpp | 9 |
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; } |