Return GetNames languages, to avoid hardcoded language lists in callers

This makes the code cleaner and also leads to some user-visible changes:

The wx game properties will no longer let the user
select WAD languages that don't have any names.

The Qt game list will now display names using the languages
set in the configuration instead of always using
English for PAL GC games and Japanese for WADs.

If a WAD doesn't have a name in the user's preferred language,
English is now selected as a fallback before Japanese.
This commit is contained in:
JosJuice committed 2015-04-23 08:14:39 +02:00
1 parent 87a63713f4
commit 235ecfbed7
30 files changed
+399 -340

No files matched your search

+1 -1
View File
@@ -69,7 +69,7 @@ static wxString FailureReasonStringForHostLabel(int reason)
static std::string BuildGameName(const GameListItem& game)
{
// Lang needs to be consistent
auto const lang = 0;
IVolume::ELanguage const lang = IVolume::LANGUAGE_ENGLISH;
std::string name(game.GetName(lang));