mirror of https://github.com/cemu-project/Cemu.git
GameList: Use title name based on console language (#388)
This commit is contained in:
parent
dd1cb1cccf
commit
c217b3ee32
|
@ -705,7 +705,13 @@ namespace CafeSystem
|
|||
{
|
||||
if (sLaunchModeIsStandalone)
|
||||
return "Unknown Game";
|
||||
return sGameInfo_ForegroundTitle.GetBase().GetMetaInfo()->GetShortName(GetConfig().console_language);
|
||||
std::string applicationName;
|
||||
applicationName = sGameInfo_ForegroundTitle.GetBase().GetMetaInfo()->GetShortName(GetConfig().console_language);
|
||||
if (applicationName.empty()) //Try to get the English Title
|
||||
applicationName = sGameInfo_ForegroundTitle.GetBase().GetMetaInfo()->GetShortName(CafeConsoleLanguage::EN);
|
||||
if (applicationName.empty()) //Unknown Game
|
||||
applicationName = "Unknown Game";
|
||||
return applicationName;
|
||||
}
|
||||
|
||||
std::string GetForegroundTitleArgStr()
|
||||
|
|
|
@ -589,7 +589,15 @@ std::string TitleInfo::GetTitleName() const
|
|||
{
|
||||
cemu_assert_debug(m_isValid);
|
||||
if (m_parsedMetaXml)
|
||||
return m_parsedMetaXml->GetShortName(CafeConsoleLanguage::EN);
|
||||
{
|
||||
std::string titleNameCfgLanguage;
|
||||
titleNameCfgLanguage = m_parsedMetaXml->GetShortName(GetConfig().console_language);
|
||||
if (titleNameCfgLanguage.empty()) //Get English Title
|
||||
titleNameCfgLanguage = m_parsedMetaXml->GetShortName(CafeConsoleLanguage::EN);
|
||||
if (titleNameCfgLanguage.empty()) //Unknown Title
|
||||
titleNameCfgLanguage = "Unknown Title";
|
||||
return titleNameCfgLanguage;
|
||||
}
|
||||
if (m_cachedInfo)
|
||||
return m_cachedInfo->titleName;
|
||||
cemu_assert_suspicious();
|
||||
|
|
|
@ -931,6 +931,8 @@ void MainWindow::OnConsoleLanguage(wxCommandEvent& event)
|
|||
default:
|
||||
cemu_assert_debug(false);
|
||||
}
|
||||
m_game_list->DeleteCachedStrings();
|
||||
m_game_list->ReloadGameEntries(false);
|
||||
g_config.Save();
|
||||
}
|
||||
|
||||
|
|
|
@ -1139,3 +1139,8 @@ bool wxGameList::QueryIconForTitle(TitleId titleId, int& icon, int& iconSmall)
|
|||
m_icon_cache_mtx.unlock();
|
||||
return true;
|
||||
}
|
||||
|
||||
void wxGameList::DeleteCachedStrings()
|
||||
{
|
||||
m_name_cache.clear();
|
||||
}
|
|
@ -50,6 +50,7 @@ public:
|
|||
bool IsVisible(long item) const; // only available in wxwidgets 3.1.3
|
||||
|
||||
void ReloadGameEntries(bool cached = false);
|
||||
void DeleteCachedStrings();
|
||||
|
||||
long FindListItemByTitleId(uint64 title_id) const;
|
||||
void OnClose(wxCloseEvent& event);
|
||||
|
|
Loading…
Reference in New Issue