SCUMM: Replace Common::File uses by SeekableReadStream and SearchMan

svn-id: r54434
This commit is contained in:
Max Horn 2010-11-23 22:25:10 +00:00
parent 55e3ed0016
commit 54e0390752
9 changed files with 15 additions and 31 deletions

View file

@ -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()) {