From 76c9eed8487d45967734f9aeef4ffe6d411230e4 Mon Sep 17 00:00:00 2001 From: JosJuice Date: Sat, 26 May 2018 14:06:51 +0200 Subject: [PATCH] InfoWidget: Use configured language by default Fixes the second half of https://bugs.dolphin-emu.org/issues/11085 --- Source/Core/DolphinQt2/Config/InfoWidget.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Source/Core/DolphinQt2/Config/InfoWidget.cpp b/Source/Core/DolphinQt2/Config/InfoWidget.cpp index 8d1b02e056..5a55e835f3 100644 --- a/Source/Core/DolphinQt2/Config/InfoWidget.cpp +++ b/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(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);