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.
This commit is contained in:
JosJuice
2020-08-29 15:12:02 +02:00
parent 800b2480ec
commit 047bb80337
7 changed files with 72 additions and 34 deletions

View File

@ -29,10 +29,7 @@ WiiEncryptionCache::EncryptGroup(u64 offset, u64 partition_data_offset,
{
// Only allocate memory if this function actually ends up getting called
if (!m_cache)
{
m_cache = std::make_unique<std::array<u8, VolumeWii::GROUP_TOTAL_SIZE>>();
ASSERT(m_blob->SupportsReadWiiDecrypted());
}
ASSERT(offset % VolumeWii::GROUP_TOTAL_SIZE == 0);
const u64 group_offset_in_partition =