ENGINES: Change mac resource fork file detection to use the file cache
Common::MacResMan is now able to open files from a specified Common::Archive. This is a bit hacky as dynamic_cast is used to break the Archive encapsulation to retreive the underlying FSNode. It should however be more correct than the previous code that assumed files were at the root of the currently running game's path. AdvancedDetector constructs a Common::Archive from its FileMap based filesystem cache and uses it to detect the mac resource fork files. This cuts the time it takes to run the detection code with all the engines enabled as dynamic plugins on the 3DS to 30 s from 280 s.
This commit is contained in:
parent
9a1e2368b2
commit
0f2c6cd9ea
14 changed files with 82 additions and 108 deletions
|
@ -60,7 +60,7 @@ GobMetaEngine::GobMetaEngine() :
|
|||
}
|
||||
|
||||
ADDetectedGame GobMetaEngine::fallbackDetect(const FileMap &allFiles, const Common::FSList &fslist) const {
|
||||
ADDetectedGame detectedGame = detectGameFilebased(allFiles, fslist, Gob::fileBased);
|
||||
ADDetectedGame detectedGame = detectGameFilebased(allFiles, Gob::fileBased);
|
||||
if (!detectedGame.desc) {
|
||||
return ADDetectedGame();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue