DETECTOR: Make detectGameFilebased() return a list of MD5s and file sizes

Since we need a FSNode parent for Mac resource forks, we need to change
signature of detectGameFilebased(), too.
This commit is contained in:
Sven Hesse 2012-06-27 04:42:36 +02:00
parent 63e13c5d2c
commit 2c760cb15e
7 changed files with 19 additions and 7 deletions

View file

@ -519,7 +519,7 @@ ADGameDescList AdvancedMetaEngine::detectGame(const Common::FSNode &parent, cons
return matched;
}
const ADGameDescription *AdvancedMetaEngine::detectGameFilebased(const FileMap &allFiles, const ADFileBasedFallback *fileBasedFallback) const {
const ADGameDescription *AdvancedMetaEngine::detectGameFilebased(const FileMap &allFiles, const Common::FSList &fslist, const ADFileBasedFallback *fileBasedFallback, ADFilePropertiesMap *filesProps) const {
const ADFileBasedFallback *ptr;
const char* const* filenames;
@ -549,6 +549,16 @@ const ADGameDescription *AdvancedMetaEngine::detectGameFilebased(const FileMap &
maxNumMatchedFiles = numMatchedFiles;
debug(4, "and overridden");
if (filesProps) {
for (filenames = ptr->filenames; *filenames; ++filenames) {
ADFileProperties tmp;
if (getFileProperties(fslist.begin()->getParent(), allFiles, *agdesc, *filenames, tmp))
(*filesProps)[*filenames] = tmp;
}
}
}
}
}