[Scummvm-cvs-logs] CVS: scummvm/base engine.cpp,1.19,1.20

Max Horn fingolfin at users.sourceforge.net
Mon Aug 2 10:10:03 CEST 2004


Update of /cvsroot/scummvm/scummvm/base
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14608

Modified Files:
	engine.cpp 
Log Message:
Workaround for bug #999122; this will fix config files which were broken by the 0.6.1 release

Index: engine.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/base/engine.cpp,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -d -r1.19 -r1.20
--- engine.cpp	18 Jul 2004 20:02:26 -0000	1.19
+++ engine.cpp	2 Aug 2004 17:09:31 -0000	1.20
@@ -69,8 +69,17 @@
 #endif
 
 	// If SCUMMVM_SAVEPATH was not specified, try to use game specific savepath from config
-	if (!dir || dir[0] == 0)
+	if (!dir || dir[0] == 0) {
 		dir = ConfMan.get("savepath").c_str();
+		
+		// Work around a bug (#999122) in the original 0.6.1 release of
+		// ScummVM, which would insert a bad savepath value into config files.
+		if (0 == strcmp(dir, "None")) {
+			ConfMan.removeKey("savepath", ConfMan.getActiveDomain());
+			ConfMan.flushToDisk();
+			dir = ConfMan.get("savepath").c_str();
+		}
+	}
 
 #ifdef _WIN32_WCE
 	if (dir[0] == 0)





More information about the Scummvm-git-logs mailing list