[Scummvm-cvs-logs] SF.net SVN: scummvm:[54163] scummvm/trunk/engines/sci

thebluegr at users.sourceforge.net thebluegr at users.sourceforge.net
Tue Nov 9 18:07:35 CET 2010


Revision: 54163
          http://scummvm.svn.sourceforge.net/scummvm/?rev=54163&view=rev
Author:   thebluegr
Date:     2010-11-09 17:07:34 +0000 (Tue, 09 Nov 2010)

Log Message:
-----------
SCI: Fixed the fallback detector again

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

Modified Paths:
--------------
    scummvm/trunk/engines/sci/detection.cpp
    scummvm/trunk/engines/sci/resource.cpp
    scummvm/trunk/engines/sci/resource.h

Modified: scummvm/trunk/engines/sci/detection.cpp
===================================================================
--- scummvm/trunk/engines/sci/detection.cpp	2010-11-09 16:56:31 UTC (rev 54162)
+++ scummvm/trunk/engines/sci/detection.cpp	2010-11-09 17:07:34 UTC (rev 54163)
@@ -513,7 +513,7 @@
 	ResourceManager *resMan = new ResourceManager();
 	assert(resMan);
 	resMan->addAppropriateSources(fslist);
-	resMan->init();
+	resMan->init(true);
 	// TODO: Add error handling.
 
 #ifndef ENABLE_SCI32

Modified: scummvm/trunk/engines/sci/resource.cpp
===================================================================
--- scummvm/trunk/engines/sci/resource.cpp	2010-11-09 16:56:31 UTC (rev 54162)
+++ scummvm/trunk/engines/sci/resource.cpp	2010-11-09 17:07:34 UTC (rev 54163)
@@ -813,7 +813,7 @@
 ResourceManager::ResourceManager() {
 }
 
-void ResourceManager::init() {
+void ResourceManager::init(bool initFromFallbackDetector) {
 	_memoryLocked = 0;
 	_memoryLRU = 0;
 	_LRU.clear();
@@ -845,13 +845,13 @@
 
 	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();
 
 	debugC(1, kDebugLevelResMan, "resMan: Detected %s", getSciVersionDesc(getSciVersion()));

Modified: scummvm/trunk/engines/sci/resource.h
===================================================================
--- scummvm/trunk/engines/sci/resource.h	2010-11-09 16:56:31 UTC (rev 54162)
+++ scummvm/trunk/engines/sci/resource.h	2010-11-09 17:07:34 UTC (rev 54163)
@@ -273,7 +273,7 @@
 	/**
 	 * 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?


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.




More information about the Scummvm-git-logs mailing list