aboutsummaryrefslogtreecommitdiff
path: root/gui
diff options
context:
space:
mode:
authorEugene Sandulenko2007-01-29 23:25:51 +0000
committerEugene Sandulenko2007-01-29 23:25:51 +0000
commitadcfd2cc5f64157bd5135e5a90b29443036233f2 (patch)
tree1ee0bbc7c06e93a9c584892b2261322dd32779fa /gui
parent7bb9b05f551b81f3c34dacf3bea80ae7fd726fbc (diff)
downloadscummvm-rg350-adcfd2cc5f64157bd5135e5a90b29443036233f2.tar.gz
scummvm-rg350-adcfd2cc5f64157bd5135e5a90b29443036233f2.tar.bz2
scummvm-rg350-adcfd2cc5f64157bd5135e5a90b29443036233f2.zip
Now AdvancedDetector could use single ID per engine. Also it can suggest
more complex game IDs with platform and language specified. AGI engine benefits most from that. Also turned Cine, Parallaction and SAGA to single ID, autoupgrading old ID. svn-id: r25269
Diffstat (limited to 'gui')
-rw-r--r--gui/launcher.cpp11
1 files changed, 9 insertions, 2 deletions
diff --git a/gui/launcher.cpp b/gui/launcher.cpp
index a9f25dcf42..33b4aa17ab 100644
--- a/gui/launcher.cpp
+++ b/gui/launcher.cpp
@@ -694,15 +694,22 @@ void LauncherDialog::addGameToConf(const FilesystemNode &dir, const GameDescript
// The auto detector or the user made a choice.
// Pick a domain name which does not yet exist (after all, we
// are *adding* a game to the config, not replacing).
- String domain(result.gameid());
+ String domain;
+
+ if (result.contains("preferredtarget"))
+ domain = result["preferredtarget"];
+ else
+ domain = result.gameid();
+
assert(!domain.empty());
if (ConfMan.hasGameDomain(domain)) {
int suffixN = 1;
char suffix[16];
+ String gameid(domain);
while (ConfMan.hasGameDomain(domain)) {
snprintf(suffix, 16, "-%d", suffixN);
- domain = result.gameid() + suffix;
+ domain = gameid + suffix;
suffixN++;
}
}