diff options
author | Marcus Comstedt | 2016-09-26 15:22:26 +0200 |
---|---|---|
committer | Marcus Comstedt | 2016-09-27 13:06:15 +0200 |
commit | 95ad63e9922976c1d2ecd97d1fce03bdc023189c (patch) | |
tree | 496d1d8ec7e815d45ce25fd65627333c55e7b095 /backends | |
parent | 4aacc41fff5f96b3e318e99d036796424dadff7f (diff) | |
download | scummvm-rg350-95ad63e9922976c1d2ecd97d1fce03bdc023189c.tar.gz scummvm-rg350-95ad63e9922976c1d2ecd97d1fce03bdc023189c.tar.bz2 scummvm-rg350-95ad63e9922976c1d2ecd97d1fce03bdc023189c.zip |
DC: Ignore case for VM filenames
Diffstat (limited to 'backends')
-rw-r--r-- | backends/platform/dc/vmsave.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/backends/platform/dc/vmsave.cpp b/backends/platform/dc/vmsave.cpp index 5e8f50ca89..b4f8e205b8 100644 --- a/backends/platform/dc/vmsave.cpp +++ b/backends/platform/dc/vmsave.cpp @@ -292,11 +292,20 @@ public: }; class VMSaveManager : public Common::SaveFileManager { +private: + static int nameCompare(const unsigned char *entry, const char *match) { + return !scumm_strnicmp(reinterpret_cast<const char *>(entry), match, 12); + } + public: virtual void updateSavefilesList(Common::StringArray &lockedFiles) { // TODO: implement this (locks files, preventing them from being listed, saved or loaded) } + VMSaveManager() { + vmsfs_name_compare_function = nameCompare; + } + virtual Common::InSaveFile *openRawFile(const Common::String &filename) { InVMSave *s = new InVMSave(); if (s->readSaveGame(filename.c_str())) { |