diff options
| author | JosJuice <josjuice@gmail.com> | 2020-06-21 20:41:50 +0200 |
|---|---|---|
| committer | JosJuice <josjuice@gmail.com> | 2020-06-21 20:47:23 +0200 |
| commit | d494e0230c2ebfd580bb66b2a741d19ef830d658 (patch) | |
| tree | edd701dfdd98be00f0971dc747eea0dcbe5f7c71 /Source/Core/UICommon/GameFile.cpp | |
| parent | 99822518994d62def4e336f6746d6a2e2d108fb2 (diff) | |
Show file format details in game properties
Diffstat (limited to 'Source/Core/UICommon/GameFile.cpp')
| -rw-r--r-- | Source/Core/UICommon/GameFile.cpp | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/Source/Core/UICommon/GameFile.cpp b/Source/Core/UICommon/GameFile.cpp index ca5c53ae31..31a3fa4d26 100644 --- a/Source/Core/UICommon/GameFile.cpp +++ b/Source/Core/UICommon/GameFile.cpp @@ -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; |
