summaryrefslogtreecommitdiff
path: root/Source/Core/DiscIO/VolumeWii.cpp
diff options
context:
space:
mode:
authorJosJuice <josjuice@gmail.com>2020-08-29 15:12:02 +0200
committerJosJuice <josjuice@gmail.com>2020-08-29 15:18:52 +0200
commit047bb803376a294a66bca5c9e91e23918706d151 (patch)
treec46f83fd3434880278d225c63241e298a4a80c24 /Source/Core/DiscIO/VolumeWii.cpp
parent800b2480ecb0d5d0285c6d560fb25f6b96c3b021 (diff)
DiscIO: Add parameters to BlobReader::SupportsReadWiiDecrypted
It's possible (but rare) for a WIA or RVZ file to support this for some partitions but not all, and for the game and the blob code to disagree on how large a partition is.
Diffstat (limited to 'Source/Core/DiscIO/VolumeWii.cpp')
-rw-r--r--Source/Core/DiscIO/VolumeWii.cpp8
1 files changed, 3 insertions, 5 deletions
diff --git a/Source/Core/DiscIO/VolumeWii.cpp b/Source/Core/DiscIO/VolumeWii.cpp
index db31530c8e..2f0c833549 100644
--- a/Source/Core/DiscIO/VolumeWii.cpp
+++ b/Source/Core/DiscIO/VolumeWii.cpp
@@ -171,11 +171,9 @@ bool VolumeWii::Read(u64 offset, u64 length, u8* buffer, const Partition& partit
return false;
const PartitionDetails& partition_details = it->second;
- if (m_reader->SupportsReadWiiDecrypted())
- {
- return m_reader->ReadWiiDecrypted(offset, length, buffer,
- partition.offset + *partition_details.data_offset);
- }
+ const u64 partition_data_offset = partition.offset + *partition_details.data_offset;
+ if (m_reader->SupportsReadWiiDecrypted(offset, length, partition_data_offset))
+ return m_reader->ReadWiiDecrypted(offset, length, buffer, partition_data_offset);
if (!m_encrypted)
{