diff options
author | Willem Jan Palenstijn | 2017-09-18 22:41:25 +0200 |
---|---|---|
committer | Willem Jan Palenstijn | 2017-09-20 20:53:14 +0200 |
commit | 6bea267385d130e1957f67f28f14225301d15eba (patch) | |
tree | 9f3f0229f797c6ee5fb1527a6e6a0a3fdeaa8325 /engines/sludge | |
parent | 6a7d43288fb6d7e0e037ba837ae51738b230f938 (diff) | |
download | scummvm-rg350-6bea267385d130e1957f67f28f14225301d15eba.tar.gz scummvm-rg350-6bea267385d130e1957f67f28f14225301d15eba.tar.bz2 scummvm-rg350-6bea267385d130e1957f67f28f14225301d15eba.zip |
SLUDGE: Skip SearchMan detour in fallback detection
Diffstat (limited to 'engines/sludge')
-rw-r--r-- | engines/sludge/detection.cpp | 20 |
1 files changed, 8 insertions, 12 deletions
diff --git a/engines/sludge/detection.cpp b/engines/sludge/detection.cpp index de5897b66c..cdb67fae79 100644 --- a/engines/sludge/detection.cpp +++ b/engines/sludge/detection.cpp @@ -122,26 +122,22 @@ const ADGameDescription *SludgeMetaEngine::fallbackDetect(const FileMap &allFile if (!(fileName.hasSuffix(".slg") || fileName == "gamedata")) continue; - SearchMan.clear(); - SearchMan.addDirectory(file->getParent().getName(), file->getParent()); - - Common::SeekableReadStream *stream = SearchMan.createReadStreamForMember(file->getName()); - - if (!stream) + Common::File f; + if (!f.open(*file)) continue; bool headerBad = false; - if (stream->readByte() != 'S') + if (f.readByte() != 'S') headerBad = true; - if (stream->readByte() != 'L') + if (f.readByte() != 'L') headerBad = true; - if (stream->readByte() != 'U') + if (f.readByte() != 'U') headerBad = true; - if (stream->readByte() != 'D') + if (f.readByte() != 'D') headerBad = true; - if (stream->readByte() != 'G') + if (f.readByte() != 'G') headerBad = true; - if (stream->readByte() != 'E') + if (f.readByte() != 'E') headerBad = true; if (headerBad) { continue; |