aboutsummaryrefslogtreecommitdiff
path: root/gui
diff options
context:
space:
mode:
authorMax Horn2002-11-13 20:23:24 +0000
committerMax Horn2002-11-13 20:23:24 +0000
commit287d45ff364f6c278c9f82a5efa1f2d92071431e (patch)
tree67b2e57a0096f0f1b949edefa99d1d0e32978517 /gui
parenta8d43b64901c96adb3fb67c50fc0e58cb3f71eba (diff)
downloadscummvm-rg350-287d45ff364f6c278c9f82a5efa1f2d92071431e.tar.gz
scummvm-rg350-287d45ff364f6c278c9f82a5efa1f2d92071431e.tar.bz2
scummvm-rg350-287d45ff364f6c278c9f82a5efa1f2d92071431e.zip
cleaned up Config::get_domain; fixed sorting in launcher
svn-id: r5541
Diffstat (limited to 'gui')
-rw-r--r--gui/launcher.cpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/gui/launcher.cpp b/gui/launcher.cpp
index 4d5a933aee..fff6290f3f 100644
--- a/gui/launcher.cpp
+++ b/gui/launcher.cpp
@@ -76,16 +76,15 @@ LauncherDialog::LauncherDialog(NewGui *gui, GameDetector &detector)
// 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 @@ LauncherDialog::LauncherDialog(NewGui *gui, GameDetector &detector)
// 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]);