Merge pull request #11751 from noahpistilli/discord-rpc
UICommon/DiscordPresence: Use GameTDB covers for RPC
This commit is contained in:
4 files changed
+47
-124
No files matched your search
@@ -433,3 +433,38 @@ Common::IniFile SConfig::LoadGameIni(const std::string& id, std::optional<u16> r
|
||||
game_ini.Load(File::GetUserPath(D_GAMESETTINGS_IDX) + filename, true);
|
||||
return game_ini;
|
||||
}
|
||||
|
||||
std::string SConfig::GetGameTDBImageRegionCode(bool wii, DiscIO::Region region) const
|
||||
{
|
||||
switch (region)
|
||||
{
|
||||
case DiscIO::Region::NTSC_J:
|
||||
return "JA";
|
||||
case DiscIO::Region::NTSC_U:
|
||||
return "US";
|
||||
case DiscIO::Region::NTSC_K:
|
||||
return "KO";
|
||||
case DiscIO::Region::PAL:
|
||||
{
|
||||
const auto user_lang = GetCurrentLanguage(wii);
|
||||
switch (user_lang)
|
||||
{
|
||||
case DiscIO::Language::German:
|
||||
return "DE";
|
||||
case DiscIO::Language::French:
|
||||
return "FR";
|
||||
case DiscIO::Language::Spanish:
|
||||
return "ES";
|
||||
case DiscIO::Language::Italian:
|
||||
return "IT";
|
||||
case DiscIO::Language::Dutch:
|
||||
return "NL";
|
||||
case DiscIO::Language::English:
|
||||
default:
|
||||
return "EN";
|
||||
}
|
||||
}
|
||||
default:
|
||||
return "EN";
|
||||
}
|
||||
}
|
||||
@@ -83,6 +83,7 @@ struct SConfig
|
||||
bool SetPathsAndGameMetadata(const BootParameters& boot);
|
||||
DiscIO::Language GetCurrentLanguage(bool wii) const;
|
||||
DiscIO::Language GetLanguageAdjustedForRegion(bool wii, DiscIO::Region region) const;
|
||||
std::string GetGameTDBImageRegionCode(bool wii, DiscIO::Region region) const;
|
||||
|
||||
Common::IniFile LoadDefaultGameIni() const;
|
||||
Common::IniFile LoadLocalGameIni() const;
|
||||
|
||||
Reference in new issue
Block a user