SCI: Fixed the fallback detector again

This is a regression from r54155, as we previously ignored the result of 
addInternalSources() in the fallback detector

svn-id: r54163
This commit is contained in:
Filippos Karapetis 2010-11-09 17:07:34 +00:00
parent 4582a94ff9
commit 55f0b88c07
3 changed files with 8 additions and 8 deletions

View File

@ -513,7 +513,7 @@ const ADGameDescription *SciMetaEngine::fallbackDetect(const Common::FSList &fsl
ResourceManager *resMan = new ResourceManager();
assert(resMan);
resMan->addAppropriateSources(fslist);
resMan->init();
resMan->init(true);
// TODO: Add error handling.
#ifndef ENABLE_SCI32

View File

@ -813,7 +813,7 @@ void ResourceManager::freeResourceSources() {
ResourceManager::ResourceManager() {
}
void ResourceManager::init() {
void ResourceManager::init(bool initFromFallbackDetector) {
_memoryLocked = 0;
_memoryLRU = 0;
_LRU.clear();
@ -845,12 +845,12 @@ void ResourceManager::init() {
scanNewSources();
if (!addInternalSources()) {
error("Somehow I can't seem to find the sound files I need (RESOURCE.AUD/RESOURCE.SFX), aborting");
return;
}
if (!initFromFallbackDetector) {
if (!addInternalSources())
error("Somehow I can't seem to find the sound files I need (RESOURCE.AUD/RESOURCE.SFX), aborting");
scanNewSources();
scanNewSources();
}
detectSciVersion();

View File

@ -273,7 +273,7 @@ public:
/**
* Initializes the resource manager.
*/
void init();
void init(bool initFromFallbackDetector = false);
int addAppropriateSources();
int addAppropriateSources(const Common::FSList &fslist); // TODO: Switch from FSList to Common::Archive?