mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-04-27 06:48:33 +00:00
DiscIO: Use partition data offset for ReadWiiDecrypted parameter
Instead of the partition offset (which is usually 0x20000 less).
This commit is contained in:
parent
7e94d6ed37
commit
a4c7100bcc
4 changed files with 13 additions and 8 deletions
|
@ -162,14 +162,17 @@ bool VolumeWii::Read(u64 offset, u64 length, u8* buffer, const Partition& partit
|
|||
if (partition == PARTITION_NONE)
|
||||
return m_reader->Read(offset, length, buffer);
|
||||
|
||||
if (m_reader->SupportsReadWiiDecrypted())
|
||||
return m_reader->ReadWiiDecrypted(offset, length, buffer, partition.offset);
|
||||
|
||||
auto it = m_partitions.find(partition);
|
||||
if (it == m_partitions.end())
|
||||
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);
|
||||
}
|
||||
|
||||
if (!m_encrypted)
|
||||
{
|
||||
return m_reader->Read(partition.offset + *partition_details.data_offset + offset, length,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue