[Scummvm-cvs-logs] SF.net SVN: scummvm:[40745] scummvm/trunk

sev at users.sourceforge.net sev at users.sourceforge.net
Wed May 20 23:00:52 CEST 2009


Revision: 40745
          http://scummvm.svn.sourceforge.net/scummvm/?rev=40745&view=rev
Author:   sev
Date:     2009-05-20 21:00:52 +0000 (Wed, 20 May 2009)

Log Message:
-----------
Fix bug #1544799: "ALL: Engine creates launcher entry when failing to launch"

Modified Paths:
--------------
    scummvm/trunk/base/main.cpp
    scummvm/trunk/engines/advancedDetector.cpp

Modified: scummvm/trunk/base/main.cpp
===================================================================
--- scummvm/trunk/base/main.cpp	2009-05-20 20:41:10 UTC (rev 40744)
+++ scummvm/trunk/base/main.cpp	2009-05-20 21:00:52 UTC (rev 40745)
@@ -144,6 +144,17 @@
 			ConfMan.getActiveDomainName().c_str(),
 			dir.getPath().c_str()
 			);
+
+		// Autoadded is set only when no path was provided and
+		// the game is run from command line.
+		//
+		// Thus, we remove this garbage entry
+		//
+		// Fixes bug #1544799
+		if (ConfMan.hasKey("autoadded")) {
+			ConfMan.removeGameDomain(ConfMan.getActiveDomainName().c_str());
+		}
+
 		return err;
 	}
 

Modified: scummvm/trunk/engines/advancedDetector.cpp
===================================================================
--- scummvm/trunk/engines/advancedDetector.cpp	2009-05-20 20:41:10 UTC (rev 40744)
+++ scummvm/trunk/engines/advancedDetector.cpp	2009-05-20 21:00:52 UTC (rev 40745)
@@ -244,6 +244,18 @@
 		path = ConfMan.get("path");
 	} else {
 		path = ".";
+
+		// This situation may happen only when game was
+		// launched from a command line with wrong target and
+		// no path was provided.
+		//
+		// A dummy entry will get created and will keep game path
+		// We mark this entry, so it will not be added to the
+		// config file.
+		//
+		// Fixes bug #1544799
+		ConfMan.set("autoadded", "true");
+
 		warning("No path was provided. Assuming the data files are in the current directory");
 	}
 	Common::FSNode dir(path);


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