aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFilippos Karapetis2007-08-25 16:44:44 +0000
committerFilippos Karapetis2007-08-25 16:44:44 +0000
commitc6292050a594644e2cc125fa4d8eb9cba593134c (patch)
tree668e63bf8526ed1502ccd6c69e51f49df96d50f9
parent57ee1e15bee847dee6ba4d12311d1e7757264d20 (diff)
downloadscummvm-rg350-c6292050a594644e2cc125fa4d8eb9cba593134c.tar.gz
scummvm-rg350-c6292050a594644e2cc125fa4d8eb9cba593134c.tar.bz2
scummvm-rg350-c6292050a594644e2cc125fa4d8eb9cba593134c.zip
Only close patch files for ITE, not IHNM
svn-id: r28726
-rw-r--r--engines/saga/rscfile.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/engines/saga/rscfile.cpp b/engines/saga/rscfile.cpp
index 4d3ff1e47c..bfc506b474 100644
--- a/engines/saga/rscfile.cpp
+++ b/engines/saga/rscfile.cpp
@@ -330,7 +330,11 @@ bool Resource::loadContext(ResourceContext *context) {
if (resourceData->patchData->_patchFile->open(patchDescription->fileName)) {
resourceData->offset = 0;
resourceData->size = resourceData->patchData->_patchFile->size();
- resourceData->patchData->_patchFile->close();
+ // ITE uses several patch files which are loaded and then not needed
+ // anymore (as they're in memory), so close them here. IHNM uses only
+ // 1 patch file, which is reused, so don't close it
+ if (_vm->getGameType() == GType_ITE)
+ resourceData->patchData->_patchFile->close();
} else {
delete resourceData->patchData;
resourceData->patchData = NULL;