aboutsummaryrefslogtreecommitdiff
path: root/engines/saga/rscfile.h
diff options
context:
space:
mode:
authorFilippos Karapetis2007-08-01 09:02:28 +0000
committerFilippos Karapetis2007-08-01 09:02:28 +0000
commite68624e7893f34dcf2d25df6ee536daf46d2f993 (patch)
tree8034055e3bbe53d50b120d50b39ea7a1a8dd4246 /engines/saga/rscfile.h
parentb58d259f7ee00f6cff86afc48f713979db8a31a0 (diff)
downloadscummvm-rg350-e68624e7893f34dcf2d25df6ee536daf46d2f993.tar.gz
scummvm-rg350-e68624e7893f34dcf2d25df6ee536daf46d2f993.tar.bz2
scummvm-rg350-e68624e7893f34dcf2d25df6ee536daf46d2f993.zip
Patch files are no longer left open the whole time, but are only opened when needed. This fixes the strange bug where BBM files didn't appear in the ITE demos that have substitute scenes when using MSVC compiled executables, as too many files were open at the same time
svn-id: r28381
Diffstat (limited to 'engines/saga/rscfile.h')
-rw-r--r--engines/saga/rscfile.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/engines/saga/rscfile.h b/engines/saga/rscfile.h
index f8b6ddc3be..2df3b2eb7c 100644
--- a/engines/saga/rscfile.h
+++ b/engines/saga/rscfile.h
@@ -83,6 +83,8 @@ struct ResourceContext {
Common::File *getFile(ResourceData *resourceData) const {
if (resourceData->patchData != NULL) {
+ if (!resourceData->patchData->_patchFile->isOpen())
+ resourceData->patchData->_patchFile->open(resourceData->patchData->_patchDescription->fileName);
return resourceData->patchData->_patchFile;
} else {
return file;