mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-24 06:39:46 -06:00
Use an ID-to-name map when volume has no company string
This is written so that the result of GetCompanyFromID never is cached (except on Android?). Caching is unnecessary because the string can be obtained quickly at runtime, and not caching it means that the cache doesn't have to be invalidated when GetCompanyFromID is edited.
This commit is contained in:
@ -122,6 +122,9 @@ GameListItem::GameListItem(const std::string& _rFileName)
|
||||
}
|
||||
}
|
||||
|
||||
if (m_company.empty() && m_UniqueID.size() >= 6)
|
||||
m_company = DiscIO::GetCompanyFromID(m_UniqueID.substr(4, 2));
|
||||
|
||||
if (IsValid())
|
||||
{
|
||||
IniFile ini = SCoreStartupParameter::LoadGameIni(m_UniqueID, m_Revision);
|
||||
|
@ -312,10 +312,9 @@ static std::string GetCompany(std::string filename)
|
||||
DiscIO::IVolume* pVolume = DiscIO::CreateVolumeFromFilename(filename);
|
||||
if (pVolume != nullptr)
|
||||
{
|
||||
std::string date = pVolume->GetCompany();
|
||||
__android_log_print(ANDROID_LOG_INFO, DOLPHIN_TAG, "Company: %s", date.c_str());
|
||||
|
||||
return date;
|
||||
std::string company = DiscIO::GetCompanyFromID(pVolume->GetMakerID());
|
||||
__android_log_print(ANDROID_LOG_INFO, DOLPHIN_TAG, "Company: %s", company.c_str());
|
||||
return company;
|
||||
}
|
||||
return std::string ("");
|
||||
}
|
||||
|
Reference in New Issue
Block a user