diff options
author | Paul Gilbert | 2016-07-26 19:48:14 -0400 |
---|---|---|
committer | Paul Gilbert | 2016-07-26 19:48:14 -0400 |
commit | 504cf6ecb688a3f1c65a857bffd527d8b0e6ba63 (patch) | |
tree | 0c0d96d4061c11850c851f0fc981c75a58c20515 /audio/softsynth/mt32/ROMInfo.cpp | |
parent | d8c28d15ae553d047b7e571f98727fa79ee143f3 (diff) | |
parent | e19922d181e775791f9105b8be7ff410770ede51 (diff) | |
download | scummvm-rg350-504cf6ecb688a3f1c65a857bffd527d8b0e6ba63.tar.gz scummvm-rg350-504cf6ecb688a3f1c65a857bffd527d8b0e6ba63.tar.bz2 scummvm-rg350-504cf6ecb688a3f1c65a857bffd527d8b0e6ba63.zip |
Merge branch 'master' into xeen
Diffstat (limited to 'audio/softsynth/mt32/ROMInfo.cpp')
-rw-r--r-- | audio/softsynth/mt32/ROMInfo.cpp | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/audio/softsynth/mt32/ROMInfo.cpp b/audio/softsynth/mt32/ROMInfo.cpp index 7c0127078b..f6817c1a4d 100644 --- a/audio/softsynth/mt32/ROMInfo.cpp +++ b/audio/softsynth/mt32/ROMInfo.cpp @@ -54,12 +54,21 @@ static const ROMInfo *getKnownROMInfoFromList(unsigned int index) { const ROMInfo* ROMInfo::getROMInfo(Common::File *file) { size_t fileSize = file->size(); + Common::String fileName = file->getName(); + fileName.toUppercase(); + bool isCM32LROM = fileName.hasPrefix("CM32L_"); // We haven't added the SHA1 checksum code in ScummVM, as the file size - // suffices for our needs for now. + // and ROM name suffices for our needs for now. //const char *fileDigest = file->getSHA1(); for (int i = 0; getKnownROMInfoFromList(i) != NULL; i++) { const ROMInfo *romInfo = getKnownROMInfoFromList(i); if (fileSize == romInfo->fileSize /*&& !strcmp(fileDigest, romInfo->sha1Digest)*/) { + if (fileSize == 65536) { + // If we are looking for a CM-32L ROM, make sure we return the first matching + // CM-32L ROM from the list, instead of the first matching MT-32 ROM + if (isCM32LROM && romInfo->controlROMFeatures->isDefaultReverbMT32Compatible()) + continue; + } return romInfo; } } |