diff options
| author | JosJuice <josjuice@gmail.com> | 2022-08-01 11:53:30 +0200 |
|---|---|---|
| committer | JosJuice <josjuice@gmail.com> | 2022-08-04 22:00:59 +0200 |
| commit | a87dffe52d8bfaa05d07770a9113cf9406ea6db0 (patch) | |
| tree | 2adcf23a6b4d18d06c714bc89a12df229ce29c21 /Source/Core/DiscIO/VolumeVerifier.cpp | |
| parent | 3a6df63e9bcfeedbcd9a479c9d0ba930d4939c1a (diff) | |
DiscIO: Replace IsDataSizeAccurate with GetDataSizeType
Previously, we had WBFS and CISO which both returned an upper bound
of the size, and other formats which returned an accurate size. But
now we also have NFS, which returns a lower bound of the size. To
allow VolumeVerifier to make better informed decisions for NFS, let's
use an enum instead of a bool for the type of data size a blob has.
Diffstat (limited to 'Source/Core/DiscIO/VolumeVerifier.cpp')
| -rw-r--r-- | Source/Core/DiscIO/VolumeVerifier.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Source/Core/DiscIO/VolumeVerifier.cpp b/Source/Core/DiscIO/VolumeVerifier.cpp index 460fd2a46b..bc86a40681 100644 --- a/Source/Core/DiscIO/VolumeVerifier.cpp +++ b/Source/Core/DiscIO/VolumeVerifier.cpp @@ -62,7 +62,7 @@ void RedumpVerifier::Start(const Volume& volume) m_revision = volume.GetRevision().value_or(0); m_disc_number = volume.GetDiscNumber().value_or(0); - m_size = volume.GetSize(); + m_size = volume.GetDataSize(); const DiscIO::Platform platform = volume.GetVolumeType(); @@ -364,7 +364,7 @@ VolumeVerifier::VolumeVerifier(const Volume& volume, bool redump_verification, m_hashes_to_calculate(hashes_to_calculate), m_calculating_any_hash(hashes_to_calculate.crc32 || hashes_to_calculate.md5 || hashes_to_calculate.sha1), - m_max_progress(volume.GetSize()) + m_max_progress(volume.GetDataSize()) { if (!m_calculating_any_hash) m_redump_verification = false; @@ -758,10 +758,10 @@ bool VolumeVerifier::ShouldBeDualLayer() const void VolumeVerifier::CheckVolumeSize() { - u64 volume_size = m_volume.GetSize(); + u64 volume_size = m_volume.GetDataSize(); const bool is_disc = IsDisc(m_volume.GetVolumeType()); const bool should_be_dual_layer = is_disc && ShouldBeDualLayer(); - const bool is_size_accurate = m_volume.IsSizeAccurate(); + const bool is_size_accurate = m_volume.GetDataSizeType() != DiscIO::DataSizeType::Accurate; bool volume_size_roughly_known = is_size_accurate; if (should_be_dual_layer && m_biggest_referenced_offset <= SL_DVD_R_SIZE) |
