diff options
| author | Mathew Maidment <mathew1800@gmail.com> | 2015-12-21 11:33:56 -0500 |
|---|---|---|
| committer | Mathew Maidment <mathew1800@gmail.com> | 2015-12-21 11:33:56 -0500 |
| commit | 44a35789936a9df8b01033e1209014841e4cc35c (patch) | |
| tree | a50c155e87781ce94bec1f9d27af7c211f8d4286 /Source/Core/DolphinQt2/GameList/GameFile.cpp | |
| parent | 365a326798853676bad3c83274744000a47cfa41 (diff) | |
| parent | 3a4a60f937373f48324328f3f5580b8ffcf2aeed (diff) | |
Merge pull request #3367 from spxtr/DQt2
DQt2: Use a separate INI file for UI settings
Diffstat (limited to 'Source/Core/DolphinQt2/GameList/GameFile.cpp')
| -rw-r--r-- | Source/Core/DolphinQt2/GameList/GameFile.cpp | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/Source/Core/DolphinQt2/GameList/GameFile.cpp b/Source/Core/DolphinQt2/GameList/GameFile.cpp index 6a0920e17e..e5419ae7d7 100644 --- a/Source/Core/DolphinQt2/GameList/GameFile.cpp +++ b/Source/Core/DolphinQt2/GameList/GameFile.cpp @@ -14,6 +14,7 @@ #include "Core/ConfigManager.h" #include "DiscIO/VolumeCreator.h" #include "DolphinQt2/Resources.h" +#include "DolphinQt2/Settings.h" #include "DolphinQt2/GameList/GameFile.h" static const int CACHE_VERSION = 13; // Last changed in PR #3261 @@ -50,12 +51,6 @@ GameFile::GameFile(QString path) : m_path(path) m_valid = true; } -DiscIO::IVolume::ELanguage GameFile::GetDefaultLanguage() const -{ - bool wii = m_platform != DiscIO::IVolume::GAMECUBE_DISC; - return SConfig::GetInstance().GetCurrentLanguage(wii); -} - QString GameFile::GetCacheFileName() const { QString folder = QString::fromStdString(File::GetUserPath(D_CACHE_IDX)); @@ -194,7 +189,14 @@ QString GameFile::GetLanguageString(QMap<DiscIO::IVolume::ELanguage, QString> m) // Try the settings language, then English, then just pick one. if (m.isEmpty()) return QString(); - DiscIO::IVolume::ELanguage current_lang = GetDefaultLanguage(); + + bool wii = m_platform != DiscIO::IVolume::GAMECUBE_DISC; + DiscIO::IVolume::ELanguage current_lang; + if (wii) + current_lang = Settings().GetWiiSystemLanguage(); + else + current_lang = Settings().GetGCSystemLanguage(); + if (m.contains(current_lang)) return m[current_lang]; if (m.contains(DiscIO::IVolume::LANGUAGE_ENGLISH)) |
