[Scummvm-cvs-logs] SF.net SVN: scummvm:[55580] scummvm/trunk/engines/drascula/detection.cpp

tdhs at users.sourceforge.net tdhs at users.sourceforge.net
Fri Jan 28 02:09:28 CET 2011


Revision: 55580
          http://scummvm.svn.sourceforge.net/scummvm/?rev=55580&view=rev
Author:   tdhs
Date:     2011-01-28 01:09:27 +0000 (Fri, 28 Jan 2011)

Log Message:
-----------
DRASCULA: Fix for Duplicate Registering of Archive.

A warning occurs that the archive, Packet.001 has been added twice.
This is due to a hack to get the detector priority listing correct.
This fix prevents this causing a multiple add of the same archive.

Modified Paths:
--------------
    scummvm/trunk/engines/drascula/detection.cpp

Modified: scummvm/trunk/engines/drascula/detection.cpp
===================================================================
--- scummvm/trunk/engines/drascula/detection.cpp	2011-01-28 01:05:17 UTC (rev 55579)
+++ scummvm/trunk/engines/drascula/detection.cpp	2011-01-28 01:09:27 UTC (rev 55580)
@@ -30,7 +30,6 @@
 
 #include "drascula/drascula.h"
 
-
 namespace Drascula {
 
 struct DrasculaGameDescription {
@@ -49,8 +48,10 @@
 	const ADGameFileDescription *ag;
 
 	if (getFeatures() & GF_PACKED) {
-		for (ag = _gameDescription->desc.filesDescriptions; ag->fileName; ag++)
-			_archives.registerArchive(ag->fileName, ag->fileType);
+		for (ag = _gameDescription->desc.filesDescriptions; ag->fileName; ag++) {
+			if (!_archives.hasArchive(ag->fileName))
+				_archives.registerArchive(ag->fileName, ag->fileType);
+		}
 	}
 
 	_archives.enableFallback(true);
@@ -63,13 +64,11 @@
 	{0, 0}
 };
 
-
 namespace Drascula {
 
 using Common::GUIO_NONE;
 
 static const DrasculaGameDescription gameDescriptions[] = {
-
 	{
 		// Drascula English version
 		{


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