diff options
| author | JosJuice <josjuice@gmail.com> | 2015-05-24 17:41:53 +0200 |
|---|---|---|
| committer | JosJuice <josjuice@gmail.com> | 2015-05-24 17:41:53 +0200 |
| commit | d2e6adb045179b9e8c132ade0620820b7c494ac5 (patch) | |
| tree | 33117280c4ba10782d051d4a017d6c85d31a13be /Source/Core/DolphinWX/MainAndroid.cpp | |
| parent | a784a12b5179db6544502ebac114b9ec425bebe8 (diff) | |
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.
Diffstat (limited to 'Source/Core/DolphinWX/MainAndroid.cpp')
| -rw-r--r-- | Source/Core/DolphinWX/MainAndroid.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/Source/Core/DolphinWX/MainAndroid.cpp b/Source/Core/DolphinWX/MainAndroid.cpp index c274deb5fb..4d125fb058 100644 --- a/Source/Core/DolphinWX/MainAndroid.cpp +++ b/Source/Core/DolphinWX/MainAndroid.cpp @@ -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 (""); } |
