aboutsummaryrefslogtreecommitdiff
path: root/engines/scumm/detection.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'engines/scumm/detection.cpp')
-rw-r--r--engines/scumm/detection.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/engines/scumm/detection.cpp b/engines/scumm/detection.cpp
index 10224d997d..6430ab7c4d 100644
--- a/engines/scumm/detection.cpp
+++ b/engines/scumm/detection.cpp
@@ -466,7 +466,7 @@ static void detectGames(const Common::FSList &fslist, Common::List<DetectorResul
//
DetectorDesc &d = fileMD5Map[file];
if (d.md5.empty()) {
- Common::File *tmp = 0;
+ Common::SeekableReadStream *tmp = 0;
bool isDiskImg = (file.hasSuffix(".d64") || file.hasSuffix(".dsk") || file.hasSuffix(".prg"));
if (isDiskImg) {
@@ -474,12 +474,11 @@ static void detectGames(const Common::FSList &fslist, Common::List<DetectorResul
debug(2, "Falling back to disk-based detection");
} else {
- tmp = new Common::File;
- tmp->open(d.node);
+ tmp = d.node.createReadStream();
}
Common::String md5str;
- if (tmp && tmp->isOpen())
+ if (tmp)
md5str = computeStreamMD5AsString(*tmp, kMD5FileSizeLimit);
if (!md5str.empty()) {