From 95ad63e9922976c1d2ecd97d1fce03bdc023189c Mon Sep 17 00:00:00 2001 From: Marcus Comstedt Date: Mon, 26 Sep 2016 15:22:26 +0200 Subject: DC: Ignore case for VM filenames --- backends/platform/dc/vmsave.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'backends') 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(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())) { -- cgit v1.2.3