[Scummvm-cvs-logs] SF.net SVN: scummvm:[48995] scummvm/trunk/common/macresman.cpp

mthreepwood at users.sourceforge.net mthreepwood at users.sourceforge.net
Mon May 10 02:50:38 CEST 2010


Revision: 48995
          http://scummvm.svn.sourceforge.net/scummvm/?rev=48995&view=rev
Author:   mthreepwood
Date:     2010-05-10 00:50:37 +0000 (Mon, 10 May 2010)

Log Message:
-----------
Minor fix for using the MacResManager with a regular file; switch MacBinary's data fork to using a SeekableSubReadStream instead of a MemoryReadStream.

Modified Paths:
--------------
    scummvm/trunk/common/macresman.cpp

Modified: scummvm/trunk/common/macresman.cpp
===================================================================
--- scummvm/trunk/common/macresman.cpp	2010-05-09 21:15:58 UTC (rev 48994)
+++ scummvm/trunk/common/macresman.cpp	2010-05-10 00:50:37 UTC (rev 48995)
@@ -108,6 +108,7 @@
 	// Fine, what about just the data fork?
 	if (file->open(filename)) {
 		_baseFileName = filename;
+		_stream = file;
 		return true;
 	}
 		
@@ -218,8 +219,7 @@
 	if (_mode == kResForkMacBinary) {
 		_stream->seek(MBI_DFLEN);
 		uint32 dataSize = _stream->readUint32BE();
-		_stream->seek(MBI_INFOHDR);
-		return _stream->readStream(dataSize);
+		return new SeekableSubReadStream(_stream, MBI_INFOHDR, MBI_INFOHDR + dataSize);
 	}
 
 	Common::File *file = new Common::File();


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.




More information about the Scummvm-git-logs mailing list