[Scummvm-git-logs] scummvm master -> c8c804ccd78cbf7cbfb8934ed1dda1e5bf2f44f2
dreammaster
dreammaster at scummvm.org
Fri Dec 22 14:26:50 CET 2017
This automated email contains information about 2 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
20d5a67f8b SHERLOCK: Disable cache for uncompressed resources
c8c804ccd7 Merge pull request #1092 from AReim1982/sherlock_wii
Commit: 20d5a67f8b71c668ca304b85c1d8b91759922031
https://github.com/scummvm/scummvm/commit/20d5a67f8b71c668ca304b85c1d8b91759922031
Author: Alexander Reim (alexander at areim.de)
Date: 2017-12-22T14:13:22+01:00
Commit Message:
SHERLOCK: Disable cache for uncompressed resources
Changed paths:
engines/sherlock/resources.cpp
diff --git a/engines/sherlock/resources.cpp b/engines/sherlock/resources.cpp
index ec7d60a..9ed6951 100644
--- a/engines/sherlock/resources.cpp
+++ b/engines/sherlock/resources.cpp
@@ -57,24 +57,23 @@ void Cache::load(const Common::String &name, Common::SeekableReadStream &stream)
int32 signature = stream.readUint32BE();
stream.seek(0);
-
- // Allocate a new cache entry
- _resources[name] = CacheEntry();
- CacheEntry &cacheEntry = _resources[name];
-
+
// Check whether the file is compressed
if (signature == MKTAG('L', 'Z', 'V', 26)) {
+
+ // Allocate a new cache entry
+ _resources[name] = CacheEntry();
+ CacheEntry &cacheEntry = _resources[name];
+
// It's compressed, so decompress the file and store its data in the cache entry
Common::SeekableReadStream *decompressed = _vm->_res->decompress(stream);
cacheEntry.resize(decompressed->size());
decompressed->read(&cacheEntry[0], decompressed->size());
delete decompressed;
- } else {
- // It's not, so read the raw data of the file into the cache entry
- cacheEntry.resize(stream.size());
- stream.read(&cacheEntry[0], stream.size());
+
}
+
}
Common::SeekableReadStream *Cache::get(const Common::String &filename) const {
Commit: c8c804ccd78cbf7cbfb8934ed1dda1e5bf2f44f2
https://github.com/scummvm/scummvm/commit/c8c804ccd78cbf7cbfb8934ed1dda1e5bf2f44f2
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2017-12-22T08:26:46-05:00
Commit Message:
Merge pull request #1092 from AReim1982/sherlock_wii
SHERLOCK: Disable cache for uncompressed resources
Changed paths:
engines/sherlock/resources.cpp
More information about the Scummvm-git-logs
mailing list