mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-21 05:09:34 -06:00
Show file format details in game properties
This commit is contained in:
@ -115,6 +115,8 @@ GameFile::GameFile(std::string path) : m_file_path(std::move(path))
|
||||
m_region = volume->GetRegion();
|
||||
m_country = volume->GetCountry();
|
||||
m_blob_type = volume->GetBlobType();
|
||||
m_block_size = volume->GetBlobReader().GetBlockSize();
|
||||
m_compression_method = volume->GetBlobReader().GetCompressionMethod();
|
||||
m_file_size = volume->GetRawSize();
|
||||
m_volume_size = volume->GetSize();
|
||||
m_volume_size_is_accurate = volume->IsSizeAccurate();
|
||||
@ -320,6 +322,8 @@ void GameFile::DoState(PointerWrap& p)
|
||||
p.Do(m_country);
|
||||
p.Do(m_platform);
|
||||
p.Do(m_blob_type);
|
||||
p.Do(m_block_size);
|
||||
p.Do(m_compression_method);
|
||||
p.Do(m_revision);
|
||||
p.Do(m_disc_number);
|
||||
p.Do(m_apploader_date);
|
||||
@ -566,6 +570,29 @@ std::string GameFile::GetWiiFSPath() const
|
||||
return Common::GetTitleDataPath(m_title_id, Common::FROM_CONFIGURED_ROOT);
|
||||
}
|
||||
|
||||
bool GameFile::ShouldShowFileFormatDetails() const
|
||||
{
|
||||
switch (m_blob_type)
|
||||
{
|
||||
case DiscIO::BlobType::PLAIN:
|
||||
break;
|
||||
case DiscIO::BlobType::DRIVE:
|
||||
return false;
|
||||
default:
|
||||
return true;
|
||||
}
|
||||
|
||||
switch (m_platform)
|
||||
{
|
||||
case DiscIO::Platform::WiiWAD:
|
||||
return false;
|
||||
case DiscIO::Platform::ELFOrDOL:
|
||||
return false;
|
||||
default:
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
const GameBanner& GameFile::GetBannerImage() const
|
||||
{
|
||||
return m_custom_banner.empty() ? m_volume_banner : m_custom_banner;
|
||||
|
Reference in New Issue
Block a user