GCVolume: supports reading all opening.bnr information

DQT2: Game properties dialog contains info tab giving information about the selected iso.
This commit is contained in:
Rukai
2016-02-29 19:52:15 +11:00
parent afa202738e
commit b5104a79f1
29 changed files with 693 additions and 202 deletions

View File

@ -47,7 +47,8 @@ static std::string GetLanguageString(DiscIO::IVolume::ELanguage language,
if (it != end)
return it->second;
// English tends to be a good fallback when the requested language isn't available
// English tends to be a good fallback when the requested language isn't
// available
if (language != DiscIO::IVolume::ELanguage::LANGUAGE_ENGLISH)
{
it = strings.find(DiscIO::IVolume::ELanguage::LANGUAGE_ENGLISH);
@ -92,9 +93,13 @@ GameListItem::GameListItem(const std::string& _rFileName,
{
m_Platform = volume->GetVolumeType();
m_names = volume->GetNames(true);
m_descriptions = volume->GetDescriptions();
m_company = volume->GetCompany();
m_names = volume->GetLongNames();
if (m_names.empty())
m_names = volume->GetShortNames();
m_company = GetLanguageString(DiscIO::IVolume::LANGUAGE_ENGLISH, volume->GetLongMakers());
if (m_company.empty())
m_company = GetLanguageString(DiscIO::IVolume::LANGUAGE_ENGLISH, volume->GetShortMakers());
m_Country = volume->GetCountry();
m_blob_type = volume->GetBlobType();
@ -145,13 +150,16 @@ GameListItem::GameListItem(const std::string& _rFileName,
std::string path, name;
SplitPath(m_FileName, &path, &name, nullptr);
// A bit like the Homebrew Channel icon, except there can be multiple files in a folder with their
// A bit like the Homebrew Channel icon, except there can be multiple files in
// a folder with their
// own icons.
// Useful for those who don't want to have a Homebrew Channel-style folder structure.
// Useful for those who don't want to have a Homebrew Channel-style folder
// structure.
if (ReadPNGBanner(path + name + ".png"))
return;
// Homebrew Channel icon. Typical for DOLs and ELFs, but can be also used with volumes.
// Homebrew Channel icon. Typical for DOLs and ELFs, but can be also used with
// volumes.
if (ReadPNGBanner(path + "icon.png"))
return;