aboutsummaryrefslogtreecommitdiff
path: root/backends/platform/dc/dcmain.cpp
diff options
context:
space:
mode:
authorMarcus Comstedt2009-06-13 23:42:39 +0000
committerMarcus Comstedt2009-06-13 23:42:39 +0000
commit95f02dd86f95bfb5764077da4c9c399c89c35b07 (patch)
tree1bad65a730ff13c4b793eb8bee3561abfc0a5854 /backends/platform/dc/dcmain.cpp
parent3e8ea400e3b038db49ba56b95de45b1912ffe2b3 (diff)
downloadscummvm-rg350-95f02dd86f95bfb5764077da4c9c399c89c35b07.tar.gz
scummvm-rg350-95f02dd86f95bfb5764077da4c9c399c89c35b07.tar.bz2
scummvm-rg350-95f02dd86f95bfb5764077da4c9c399c89c35b07.zip
Detected games with different language or platform are now
no longer treated as duplicates, even if they have the same target and directory. Also, pass these parameters to the ConfMan, so that the correct version of the game is started. svn-id: r41504
Diffstat (limited to 'backends/platform/dc/dcmain.cpp')
-rw-r--r--backends/platform/dc/dcmain.cpp12
1 files changed, 11 insertions, 1 deletions
diff --git a/backends/platform/dc/dcmain.cpp b/backends/platform/dc/dcmain.cpp
index 7a0f71ad1a..795504d243 100644
--- a/backends/platform/dc/dcmain.cpp
+++ b/backends/platform/dc/dcmain.cpp
@@ -234,8 +234,10 @@ int main()
int DCLauncherDialog::runModal()
{
char *base = NULL, *dir = NULL;
+ Common::Language language = Common::UNK_LANG;
+ Common::Platform platform = Common::kPlatformUnknown;
- if (!selectGame(base, dir, icon))
+ if (!selectGame(base, dir, language, platform, icon))
g_system->quit();
// Set the game path.
@@ -243,6 +245,14 @@ int DCLauncherDialog::runModal()
if (dir != NULL)
ConfMan.set("path", dir, base);
+ // Set the game language.
+ if (language != Common::UNK_LANG)
+ ConfMan.set("language", Common::getLanguageCode(language), base);
+
+ // Set the game platform.
+ if (platform != Common::kPlatformUnknown)
+ ConfMan.set("platform", Common::getPlatformCode(platform), base);
+
// Set the target.
ConfMan.setActiveDomain(base);