aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorFilippos Karapetis2009-07-11 16:07:14 +0000
committerFilippos Karapetis2009-07-11 16:07:14 +0000
commit848b9cda03ce5417ea2c89612fc411699643ff9c (patch)
tree720656b6ca9c96c27eedca1cf7750cccbfcddfca /engines
parent8dd34921945ea0ce7f77e6c71ec5fbafaeb77622 (diff)
downloadscummvm-rg350-848b9cda03ce5417ea2c89612fc411699643ff9c.tar.gz
scummvm-rg350-848b9cda03ce5417ea2c89612fc411699643ff9c.tar.bz2
scummvm-rg350-848b9cda03ce5417ea2c89612fc411699643ff9c.zip
If we fail to auto-detect either the volume or the map version, set the one to be equal to the other
svn-id: r42386
Diffstat (limited to 'engines')
-rw-r--r--engines/sci/resource.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/engines/sci/resource.cpp b/engines/sci/resource.cpp
index a0aa40bcd5..b425c23876 100644
--- a/engines/sci/resource.cpp
+++ b/engines/sci/resource.cpp
@@ -470,6 +470,15 @@ ResourceManager::ResourceManager(int version, int maxMemory) {
} else {
_mapVersion = detectMapVersion();
_volVersion = detectVolVersion();
+ if (_volVersion == 0 && _mapVersion > 0) {
+ warning("Volume version not detected, but map version has been detected. Setting volume version to map version");
+ _volVersion = _mapVersion;
+ }
+
+ if (_mapVersion == 0 && _volVersion > 0) {
+ warning("Map version not detected, but volume version has been detected. Setting map version to volume version");
+ _mapVersion = _volVersion;
+ }
}
debug("Using resource map version %d %s", _mapVersion, versionNames[_mapVersion]);
debug("Using volume version %d %s", _volVersion, versionNames[_volVersion]);