[Scummvm-cvs-logs] CVS: scummvm/gui launcher.cpp,1.11,1.12

Max Horn fingolfin at users.sourceforge.net
Wed Nov 13 12:24:11 CET 2002


Update of /cvsroot/scummvm/scummvm/gui
In directory usw-pr-cvs1:/tmp/cvs-serv7411/gui

Modified Files:
	launcher.cpp 
Log Message:
cleaned up Config::get_domain; fixed sorting in launcher

Index: launcher.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/gui/launcher.cpp,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -d -r1.11 -r1.12
--- launcher.cpp	28 Oct 2002 10:40:49 -0000	1.11
+++ launcher.cpp	13 Nov 2002 20:23:24 -0000	1.12
@@ -76,16 +76,15 @@
 
 
 	// Retrieve a list of all games defined in the config file
-	char domains[255][100];
-	int count = g_config->get_domains(domains);
-	for (i=0;i<count;i++) {
+	StringList domains = g_config->get_domains();
+	for (i = 0; i < domains.size();i++) {
 		String name = (char*)g_config->get("gameid", domains[i]);
 		String description = (char*)g_config->get("description", domains[i]);
 		
 		if (name.isEmpty() || description.isEmpty()) {
 			v = version_settings;
 			while (v->filename && v->gamename) {
-				if (!scumm_stricmp(v->filename, domains[i])) {
+				if (!scumm_stricmp(v->filename, domains[i].c_str())) {
 					name = domains[i];
 					description = v->gamename;
 					break;
@@ -98,7 +97,7 @@
 			// Insert the game into the launcher list
 			int pos = 0, size = l.size();
 
-			while (pos < size && (name > l[pos]))
+			while (pos < size && (description > l[pos]))
 				pos++;
 			l.insert_at(pos, description);
 			_filenames.insert_at(pos, domains[i]);





More information about the Scummvm-git-logs mailing list