mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-22 05:40:01 -06:00
DiscIO: Do swapping in GetTitleID implementations
Gets rid of external swaps at every usage.
This commit is contained in:
@ -107,11 +107,15 @@ bool CVolumeWiiCrypted::Read(u64 _ReadOffset, u64 _Length, u8* _pBuffer, bool de
|
||||
return true;
|
||||
}
|
||||
|
||||
bool CVolumeWiiCrypted::GetTitleID(u8* _pBuffer) const
|
||||
bool CVolumeWiiCrypted::GetTitleID(u64* buffer) const
|
||||
{
|
||||
// Tik is at m_VolumeOffset size 0x2A4
|
||||
// TitleID offset in tik is 0x1DC
|
||||
return Read(m_VolumeOffset + 0x1DC, 8, _pBuffer, false);
|
||||
if (!Read(m_VolumeOffset + 0x1DC, sizeof(u64), reinterpret_cast<u8*>(buffer), false))
|
||||
return false;
|
||||
|
||||
*buffer = Common::swap64(*buffer);
|
||||
return true;
|
||||
}
|
||||
|
||||
std::unique_ptr<u8[]> CVolumeWiiCrypted::GetTMD(u32 *size) const
|
||||
|
Reference in New Issue
Block a user