summaryrefslogtreecommitdiff
path: root/Source/Core/DiscIO/VolumeVerifier.cpp
diff options
context:
space:
mode:
authorJosJuice <josjuice@gmail.com>2022-07-31 13:28:01 +0200
committerJosJuice <josjuice@gmail.com>2022-08-04 20:29:22 +0200
commitbb27d4cc95ccdaacfb4dce9a2534534d263ce20b (patch)
tree89022c99771eb5e8f1ee0a642481adca5eff6065 /Source/Core/DiscIO/VolumeVerifier.cpp
parentb02653722d88577b059b51c8bb76add081158f04 (diff)
DiscIO/VolumeWii: Decouple "is encrypted" from "is hashed"
Needed for the next commit. NFS disc images are hashed but not encrypted. While we're at it, also get rid of SupportsIntegrityCheck. It does the same thing as old IsEncryptedAndHashed and new HasWiiHashes.
Diffstat (limited to 'Source/Core/DiscIO/VolumeVerifier.cpp')
-rw-r--r--Source/Core/DiscIO/VolumeVerifier.cpp13
1 files changed, 6 insertions, 7 deletions
diff --git a/Source/Core/DiscIO/VolumeVerifier.cpp b/Source/Core/DiscIO/VolumeVerifier.cpp
index c4c5539fe2..460fd2a46b 100644
--- a/Source/Core/DiscIO/VolumeVerifier.cpp
+++ b/Source/Core/DiscIO/VolumeVerifier.cpp
@@ -403,9 +403,8 @@ void VolumeVerifier::Start()
m_is_tgc = m_volume.GetBlobType() == BlobType::TGC;
m_is_datel = m_volume.IsDatelDisc();
- m_is_not_retail =
- (m_volume.GetVolumeType() == Platform::WiiDisc && !m_volume.IsEncryptedAndHashed()) ||
- IsDebugSigned();
+ m_is_not_retail = (m_volume.GetVolumeType() == Platform::WiiDisc && !m_volume.HasWiiHashes()) ||
+ IsDebugSigned();
const std::vector<Partition> partitions = CheckPartitions();
@@ -492,7 +491,7 @@ std::vector<Partition> VolumeVerifier::CheckPartitions()
Common::GetStringT("The update partition is not at its normal position."));
}
- const u64 normal_data_offset = m_volume.IsEncryptedAndHashed() ? 0xF800000 : 0x838000;
+ const u64 normal_data_offset = m_volume.HasWiiHashes() ? 0xF800000 : 0x838000;
if (m_volume.GetPartitionType(partition) == PARTITION_DATA &&
partition.offset != normal_data_offset && !has_channel_partition && !has_install_partition)
{
@@ -593,14 +592,14 @@ bool VolumeVerifier::CheckPartition(const Partition& partition)
}
}
- if (m_volume.SupportsIntegrityCheck() && !m_volume.CheckH3TableIntegrity(partition))
+ if (m_volume.HasWiiHashes() && !m_volume.CheckH3TableIntegrity(partition))
{
AddProblem(Severity::Low,
Common::FmtFormatT("The H3 hash table for the {0} partition is not correct.", name));
}
// Prepare for hash verification in the Process step
- if (m_volume.SupportsIntegrityCheck())
+ if (m_volume.HasWiiHashes())
{
const u64 data_size =
m_volume.ReadSwappedAndShifted(partition.offset + 0x2bc, PARTITION_NONE).value_or(0);
@@ -780,7 +779,7 @@ void VolumeVerifier::CheckVolumeSize()
Common::GetStringT("The format that the disc image is saved in does not "
"store the size of the disc image."));
- if (m_volume.SupportsIntegrityCheck())
+ if (m_volume.HasWiiHashes())
{
volume_size = m_biggest_verified_offset;
volume_size_roughly_known = true;