[Scummvm-git-logs] scummvm master -> 34969d50b87a9e55dada7d76b679453e77411109

criezy criezy at scummvm.org
Wed Jul 12 22:52:00 CEST 2017


This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
34969d50b8 SWORD1: Specify list of available languages in detection code


Commit: 34969d50b87a9e55dada7d76b679453e77411109
    https://github.com/scummvm/scummvm/commit/34969d50b87a9e55dada7d76b679453e77411109
Author: Thierry Crozat (criezy at scummvm.org)
Date: 2017-07-12T21:44:10+01:00

Commit Message:
SWORD1: Specify list of available languages in detection code

This way only those languages are listed in the language selector
for the game settings.

Changed paths:
    engines/sword1/detection.cpp


diff --git a/engines/sword1/detection.cpp b/engines/sword1/detection.cpp
index 0edf856..53ddfca 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;
 }





More information about the Scummvm-git-logs mailing list