Permalink
Browse files

Merge pull request #6971 from JosJuice/infowidget-default-lang

InfoWidget: Use configured language by default
  • Loading branch information...
spycrab committed May 26, 2018
2 parents 92ec97f + 76c9eed commit 4d0708e7773405c253d6ae931a517ed1866f5164
Showing with 5 additions and 0 deletions.
  1. +5 −0 Source/Core/DolphinQt2/Config/InfoWidget.cpp
@@ -141,11 +141,16 @@ QLineEdit* InfoWidget::CreateValueDisplay(const std::string& value)
void InfoWidget::CreateLanguageSelector()
{
const bool is_wii = DiscIO::IsWii(m_game.GetPlatform());
const DiscIO::Language preferred_language = SConfig::GetInstance().GetCurrentLanguage(is_wii);
m_language_selector = new QComboBox();
for (DiscIO::Language language : m_game.GetLanguages())
{
m_language_selector->addItem(QString::fromStdString(DiscIO::GetName(language, true)),
static_cast<int>(language));
if (language == preferred_language)
m_language_selector->setCurrentIndex(m_language_selector->count() - 1);
}
if (m_language_selector->count() == 1)
m_language_selector->setDisabled(true);

0 comments on commit 4d0708e

Please sign in to comment.