DiscIO: Add Volume::IsDatelDisc
This commit is contained in:
parent
f9aaf8b971
commit
f24566bf39
|
@ -115,6 +115,7 @@ public:
|
|||
return 0;
|
||||
}
|
||||
virtual Platform GetVolumeType() const = 0;
|
||||
virtual bool IsDatelDisc() const = 0;
|
||||
virtual bool SupportsIntegrityCheck() const { return false; }
|
||||
virtual bool CheckH3TableIntegrity(const Partition& partition) const { return false; }
|
||||
virtual bool CheckBlockIntegrity(u64 block_index, const std::vector<u8>& encrypted_data,
|
||||
|
|
|
@ -62,10 +62,7 @@ std::string VolumeGC::GetGameTDBID(const Partition& partition) const
|
|||
const std::string game_id = GetGameID(partition);
|
||||
|
||||
// Don't return an ID for Datel discs that are using the game ID of NHL Hitz 2002
|
||||
if (game_id == "GNHE5d" && !GetBootDOLOffset(*this, partition).has_value())
|
||||
return "";
|
||||
|
||||
return game_id;
|
||||
return game_id == "GNHE5d" && IsDatelDisc() ? "" : game_id;
|
||||
}
|
||||
|
||||
Region VolumeGC::GetRegion() const
|
||||
|
@ -135,6 +132,11 @@ Platform VolumeGC::GetVolumeType() const
|
|||
return Platform::GameCubeDisc;
|
||||
}
|
||||
|
||||
bool VolumeGC::IsDatelDisc() const
|
||||
{
|
||||
return !GetBootDOLOffset(*this, PARTITION_NONE).has_value();
|
||||
}
|
||||
|
||||
VolumeGC::ConvertedGCBanner VolumeGC::LoadBannerFile() const
|
||||
{
|
||||
GCBanner banner_file;
|
||||
|
|
|
@ -43,6 +43,7 @@ public:
|
|||
std::vector<u32> GetBanner(u32* width, u32* height) const override;
|
||||
|
||||
Platform GetVolumeType() const override;
|
||||
bool IsDatelDisc() const override;
|
||||
Region GetRegion() const override;
|
||||
BlobType GetBlobType() const override;
|
||||
u64 GetSize() const override;
|
||||
|
|
|
@ -284,6 +284,11 @@ Platform VolumeWAD::GetVolumeType() const
|
|||
return Platform::WiiWAD;
|
||||
}
|
||||
|
||||
bool VolumeWAD::IsDatelDisc() const
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
std::map<Language, std::string> VolumeWAD::GetLongNames() const
|
||||
{
|
||||
if (!m_tmd.IsValid() || !IOS::ES::IsChannel(m_tmd.GetTitleId()))
|
||||
|
|
|
@ -59,6 +59,7 @@ public:
|
|||
return "";
|
||||
}
|
||||
Platform GetVolumeType() const override;
|
||||
bool IsDatelDisc() const override;
|
||||
Region GetRegion() const override;
|
||||
Country GetCountry(const Partition& partition = PARTITION_NONE) const override;
|
||||
|
||||
|
|
|
@ -334,6 +334,11 @@ Platform VolumeWii::GetVolumeType() const
|
|||
return Platform::WiiDisc;
|
||||
}
|
||||
|
||||
bool VolumeWii::IsDatelDisc() const
|
||||
{
|
||||
return m_game_partition == PARTITION_NONE;
|
||||
}
|
||||
|
||||
BlobType VolumeWii::GetBlobType() const
|
||||
{
|
||||
return m_reader->GetBlobType();
|
||||
|
|
|
@ -79,6 +79,7 @@ public:
|
|||
std::vector<u32> GetBanner(u32* width, u32* height) const override;
|
||||
|
||||
Platform GetVolumeType() const override;
|
||||
bool IsDatelDisc() const override;
|
||||
bool SupportsIntegrityCheck() const override { return m_encrypted; }
|
||||
bool CheckH3TableIntegrity(const Partition& partition) const override;
|
||||
bool CheckBlockIntegrity(u64 block_index, const std::vector<u8>& encrypted_data,
|
||||
|
|
|
@ -120,8 +120,7 @@ GameFile::GameFile(std::string path) : m_file_path(std::move(path))
|
|||
m_file_size = volume->GetRawSize();
|
||||
m_volume_size = volume->GetSize();
|
||||
m_volume_size_is_accurate = volume->IsSizeAccurate();
|
||||
m_is_datel_disc = DiscIO::IsDisc(m_platform) &&
|
||||
!DiscIO::GetBootDOLOffset(*volume, volume->GetGamePartition());
|
||||
m_is_datel_disc = volume->IsDatelDisc();
|
||||
|
||||
m_internal_name = volume->GetInternalName();
|
||||
m_game_id = volume->GetGameID();
|
||||
|
|
Loading…
Reference in New Issue