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

kirben at users.sourceforge.net kirben at users.sourceforge.net
Thu Jul 20 22:44:55 CEST 2006


Revision: 23475
          http://svn.sourceforge.net/scummvm/?rev=23475&view=rev
Author:   kirben
Date:     2006-07-10 04:12:11 -0700 (Mon, 10 Jul 2006)

Log Message:
-----------
Add cyx's patch for #1497725 - GUI: trying to enter empty CD drive

Modified Paths:
--------------
    scummvm/trunk/common/config-manager.cpp
    scummvm/trunk/gui/browser.cpp

Modified: scummvm/trunk/common/config-manager.cpp
===================================================================
--- scummvm/trunk/common/config-manager.cpp	2006-07-10 10:41:27 UTC (rev 23474)
+++ scummvm/trunk/common/config-manager.cpp	2006-07-10 11:12:11 UTC (rev 23475)
@@ -124,8 +124,15 @@
 				char oldConfigFile[MAXPATHLEN];
 				GetWindowsDirectory(oldConfigFile, MAXPATHLEN);
 				strcat(oldConfigFile, "\\" DEFAULT_CONFIG_FILE);
-				if (fopen(oldConfigFile, "r"))
+				if (fopen(oldConfigFile, "r")) {
+					printf("The default location of the config file (scummvm.ini) in ScummVM has changed,\n");
+					printf("under Windows NT4/2000/XP/Vista. You may want to consider moving your config\n");
+					printf("file from the old default location:\n");
+					printf("%s\n", oldConfigFile);
+					printf("to the new default location:\n");
+					printf("%s\n\n", configFile);
 					strcpy(configFile, oldConfigFile);
+				}
 			}
 		} else {
 			// Check windows directory

Modified: scummvm/trunk/gui/browser.cpp
===================================================================
--- scummvm/trunk/gui/browser.cpp	2006-07-10 10:41:27 UTC (rev 23474)
+++ scummvm/trunk/gui/browser.cpp	2006-07-10 11:12:11 UTC (rev 23475)
@@ -221,14 +221,18 @@
 void BrowserDialog::updateListing() {
 	// Update the path display
 	_currentPath->setLabel(_node.path());
-	
+
 	// We memorize the last visited path.
 	ConfMan.set("browser_lastpath", _node.path());
 
 	// Read in the data from the file system
-	_node.listDir(_nodeContent, _isDirBrowser ? FilesystemNode::kListDirectoriesOnly
-	                                          : FilesystemNode::kListAll);
-	Common::sort(_nodeContent.begin(), _nodeContent.end());
+	FilesystemNode::ListMode listMode = _isDirBrowser ? FilesystemNode::kListDirectoriesOnly
+	                                                  : FilesystemNode::kListAll;
+	if (!_node.listDir(_nodeContent, listMode)) {
+		_nodeContent.clear();
+	} else {
+		Common::sort(_nodeContent.begin(), _nodeContent.end());
+	}
 
 	// Populate the ListWidget
 	Common::StringList list;






More information about the Scummvm-git-logs mailing list