aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThierry Crozat2017-07-12 21:40:46 +0100
committerThierry Crozat2017-07-12 21:44:10 +0100
commit34969d50b87a9e55dada7d76b679453e77411109 (patch)
treebb58d867ad9269eddc3dd824ea4f02b67cc31355
parent662009b0395476d2de3e4a2e6c16eee720ec1bbc (diff)
downloadscummvm-rg350-34969d50b87a9e55dada7d76b679453e77411109.tar.gz
scummvm-rg350-34969d50b87a9e55dada7d76b679453e77411109.tar.bz2
scummvm-rg350-34969d50b87a9e55dada7d76b679453e77411109.zip
SWORD1: Specify list of available languages in detection code
This way only those languages are listed in the language selector for the game settings.
-rw-r--r--engines/sword1/detection.cpp25
1 files changed, 19 insertions, 6 deletions
diff --git a/engines/sword1/detection.cpp b/engines/sword1/detection.cpp
index 0edf856125..53ddfca213 100644
--- a/engines/sword1/detection.cpp
+++ b/engines/sword1/detection.cpp
@@ -213,18 +213,31 @@ GameList SwordMetaEngine::detectGames(const Common::FSList &fslist) const {
if (!filesFound[i] || psxFilesFound)
psxDemoFilesFound = false;
+ GameDescriptor gd;
if (mainFilesFound && pcFilesFound && demoFilesFound)
- detectedGames.push_back(GameDescriptor(sword1DemoSettings, GUIO2(GUIO_NOMIDI, GUIO_NOASPECT)));
+ gd = GameDescriptor(sword1DemoSettings, GUIO2(GUIO_NOMIDI, GUIO_NOASPECT));
else if (mainFilesFound && pcFilesFound && psxFilesFound)
- detectedGames.push_back(GameDescriptor(sword1PSXSettings, GUIO2(GUIO_NOMIDI, GUIO_NOASPECT)));
+ gd = GameDescriptor(sword1PSXSettings, GUIO2(GUIO_NOMIDI, GUIO_NOASPECT));
else if (mainFilesFound && pcFilesFound && psxDemoFilesFound)
- detectedGames.push_back(GameDescriptor(sword1PSXDemoSettings, GUIO2(GUIO_NOMIDI, GUIO_NOASPECT)));
+ gd = GameDescriptor(sword1PSXDemoSettings, GUIO2(GUIO_NOMIDI, GUIO_NOASPECT));
else if (mainFilesFound && pcFilesFound && !psxFilesFound)
- detectedGames.push_back(GameDescriptor(sword1FullSettings, GUIO2(GUIO_NOMIDI, GUIO_NOASPECT)));
+ gd = GameDescriptor(sword1FullSettings, GUIO2(GUIO_NOMIDI, GUIO_NOASPECT));
else if (mainFilesFound && macFilesFound)
- detectedGames.push_back(GameDescriptor(sword1MacFullSettings, GUIO2(GUIO_NOMIDI, GUIO_NOASPECT)));
+ gd = GameDescriptor(sword1MacFullSettings, GUIO2(GUIO_NOMIDI, GUIO_NOASPECT));
else if (mainFilesFound && macDemoFilesFound)
- detectedGames.push_back(GameDescriptor(sword1MacDemoSettings, GUIO2(GUIO_NOMIDI, GUIO_NOASPECT)));
+ gd = GameDescriptor(sword1MacDemoSettings, GUIO2(GUIO_NOMIDI, GUIO_NOASPECT));
+ else
+ return detectedGames;
+
+ gd.appendGUIOptions(getGameGUIOptionsDescriptionLanguage(Common::EN_ANY));
+ gd.appendGUIOptions(getGameGUIOptionsDescriptionLanguage(Common::DE_DEU));
+ gd.appendGUIOptions(getGameGUIOptionsDescriptionLanguage(Common::FR_FRA));
+ gd.appendGUIOptions(getGameGUIOptionsDescriptionLanguage(Common::IT_ITA));
+ gd.appendGUIOptions(getGameGUIOptionsDescriptionLanguage(Common::ES_ESP));
+ gd.appendGUIOptions(getGameGUIOptionsDescriptionLanguage(Common::PT_BRA));
+ gd.appendGUIOptions(getGameGUIOptionsDescriptionLanguage(Common::CZ_CZE));
+
+ detectedGames.push_back(gd);
return detectedGames;
}