[Scummvm-cvs-logs] CVS: scummvm/gui launcher.cpp,1.88.2.4,1.88.2.5

James Brown ender at users.sourceforge.net
Wed Jul 28 17:06:06 CEST 2004


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

Modified Files:
      Tag: branch-0-6-0
	launcher.cpp 
Log Message:
Fix launcher savegame corruption, tag release-0-6-1b


Index: launcher.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/gui/launcher.cpp,v
retrieving revision 1.88.2.4
retrieving revision 1.88.2.5
diff -u -d -r1.88.2.4 -r1.88.2.5
--- launcher.cpp	11 Jul 2004 04:36:56 -0000	1.88.2.4
+++ launcher.cpp	29 Jul 2004 00:04:59 -0000	1.88.2.5
@@ -174,21 +174,23 @@
 	yoffset = vBorder;
 	// GUI:  Button + Label for the game path
  	new ButtonWidget(tab, x, yoffset, kButtonWidth + 14, 16, "Game Path:", kCmdGameBrowser, 0);
-	_gamePathWidget = new StaticTextWidget(tab, x + kButtonWidth + 20, yoffset, _w - labelWidth - 10, kLineHeight, gamePath, kTextAlignLeft);
+	_gamePathWidget = new StaticTextWidget(tab, x + kButtonWidth + 20, yoffset + 3, _w - (x + kButtonWidth + 20) - 10, kLineHeight, gamePath, kTextAlignLeft);
 	yoffset += 18;
 
 	// GUI:  Button + Label for the additional path
  	new ButtonWidget(tab, x, yoffset, kButtonWidth + 14, 16, "Extra Path:", kCmdExtraBrowser, 0);
-	_extraPathWidget = new StaticTextWidget(tab, x + kButtonWidth + 20, yoffset, _w - labelWidth - 10, kLineHeight, extraPath, kTextAlignLeft);
-	if (extraPath.isEmpty()) {
+	_extraPathWidget = new StaticTextWidget(tab, x + kButtonWidth + 20, yoffset + 3, _w - (x + kButtonWidth + 20) - 10, kLineHeight, extraPath, kTextAlignLeft);
+
+	if (extraPath.isEmpty() || !ConfMan.hasKey("extrapath", _domain)) {
 		_extraPathWidget->setLabel("None");
 	}
 	yoffset += 18;
 
 	// GUI:  Button + Label for the save path
  	new ButtonWidget(tab, x, yoffset, kButtonWidth + 14, 16, "Save Path:", kCmdSaveBrowser, 0);
-	_savePathWidget = new StaticTextWidget(tab, x + kButtonWidth + 20, yoffset, _w - labelWidth - 10, kLineHeight, savePath, kTextAlignLeft);
-	if (savePath.isEmpty()) {
+	_savePathWidget = new StaticTextWidget(tab, x + kButtonWidth + 20, yoffset + 3, _w - (x + kButtonWidth + 20) - 10, kLineHeight, savePath, kTextAlignLeft);
+
+	if (savePath.isEmpty() || !ConfMan.hasKey("savepath", _domain)) {
 		_savePathWidget->setLabel("Default");
 	}
 	yoffset += 18;
@@ -300,8 +302,8 @@
 			ConfMan.set("extrapath", extraPath, _domain);
 
 		String savePath = _savePathWidget->getLabel();
-		if (!extraPath.isEmpty() && (extraPath != "Default"))
-			ConfMan.set("savepath", extraPath, _domain);
+		if (!savePath.isEmpty() && (savePath != "Default"))
+			ConfMan.set("savepath", savePath, _domain);
 
 		Common::Platform platform = (Common::Platform)_platformPopUp->getSelectedTag();
 		if (platform < 0)





More information about the Scummvm-git-logs mailing list