mirror of
https://github.com/libretro/scummvm.git
synced 2025-01-23 02:44:56 +00:00
SCUMM: Fix bug #1438631.
Bug #1438631: "SCUMM: Detecting mac version of indy3/loom broken" fixed by implementing recursive directory lookup similar to what was done for AdvancedDetector, since SCUMM engine does not use it. svn-id: r49656
This commit is contained in:
parent
e281f2599a
commit
ca161920a4
@ -381,10 +381,12 @@ static void computeGameSettingsFromMD5(const Common::FSList &fslist, const GameF
|
||||
}
|
||||
}
|
||||
|
||||
static void detectGames(const Common::FSList &fslist, Common::List<DetectorResult> &results, const char *gameid) {
|
||||
DescMap fileMD5Map;
|
||||
DetectorResult dr;
|
||||
char md5str[32+1];
|
||||
static void composeFileHashMap(const Common::FSList &fslist, DescMap &fileMD5Map, int depth) {
|
||||
if (depth <= 0)
|
||||
return;
|
||||
|
||||
if (fslist.empty())
|
||||
return;
|
||||
|
||||
for (Common::FSList::const_iterator file = fslist.begin(); file != fslist.end(); ++file) {
|
||||
if (!file->isDirectory()) {
|
||||
@ -392,8 +394,23 @@ static void detectGames(const Common::FSList &fslist, Common::List<DetectorResul
|
||||
d.node = *file;
|
||||
d.md5Entry = 0;
|
||||
fileMD5Map[file->getName()] = d;
|
||||
} else {
|
||||
Common::FSList files;
|
||||
|
||||
if (file->getChildren(files, Common::FSNode::kListAll)) {
|
||||
composeFileHashMap(files, fileMD5Map, depth - 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static void detectGames(const Common::FSList &fslist, Common::List<DetectorResult> &results, const char *gameid) {
|
||||
DescMap fileMD5Map;
|
||||
DetectorResult dr;
|
||||
char md5str[32+1];
|
||||
|
||||
// Dive one level down since mac indy3/loom has its files split into directories. See Bug #1438631
|
||||
composeFileHashMap(fslist, fileMD5Map, 2);
|
||||
|
||||
// Iterate over all filename patterns.
|
||||
for (const GameFilenamePattern *gfp = gameFilenamesTable; gfp->gameid; ++gfp) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user