DiscIO: Do swapping in GetTitleID implementations

Gets rid of external swaps at every usage.
This commit is contained in:
Lioncash
2015-09-22 13:25:54 -04:00
parent 5d774df1e8
commit 4b9b82e000
10 changed files with 28 additions and 30 deletions

View File

@ -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