aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorPaul Gilbert2016-07-18 21:47:19 -0400
committerPaul Gilbert2016-07-18 21:47:19 -0400
commit87379442ffb497352915b058b100b688d96a98e9 (patch)
tree4e9a0aa74c2e0c057a568a07d1b31862fbc695a0 /engines
parent25e8d1d5a8724b7bb93de2cb3b0253bdb6b66e4c (diff)
downloadscummvm-rg350-87379442ffb497352915b058b100b688d96a98e9.tar.gz
scummvm-rg350-87379442ffb497352915b058b100b688d96a98e9.tar.bz2
scummvm-rg350-87379442ffb497352915b058b100b688d96a98e9.zip
TITANIC: Fix scanning for files not to free resources
Diffstat (limited to 'engines')
-rw-r--r--engines/titanic/support/files_manager.cpp12
1 files changed, 7 insertions, 5 deletions
diff --git a/engines/titanic/support/files_manager.cpp b/engines/titanic/support/files_manager.cpp
index c415731f16..1d2b1d9a8e 100644
--- a/engines/titanic/support/files_manager.cpp
+++ b/engines/titanic/support/files_manager.cpp
@@ -86,14 +86,16 @@ bool CFilesManager::scanForFile(const CString &name) {
fname += ".st";
}
+ // Return true if the file exists
+ if (fileExists(fname))
+ return true;
+
+ // Couldn't find file. Start by calling the game manager's viewChange
+ // method, which handles all active scene objects freeing their resources
if (_gameManager)
_gameManager->viewChange();
- // The original had a bunch of code here handling determining
- // which asset path, if any, the filename was present for,
- // and storing the "active asset path" it was found on.
- // This is redundant for ScummVM, which takes care of the paths
- return fileExists(fname);
+ return false;
}
void CFilesManager::loadDrive() {