DiscIO: Do swapping in GetTitleID implementations

Gets rid of external swaps at every usage.
This commit is contained in:
Lioncash committed 2015-09-22 13:50:35 -04:00
1 parent 5d774df1e8
commit 4b9b82e000
10 files changed
+28 -30

No files matched your search

@@ -115,8 +115,7 @@ void CWII_IPC_HLE_Device_es::OpenInternal()
{
// blindly grab the titleID from the disc - it's unencrypted at:
// offset 0x0F8001DC and 0x0F80044C
DVDInterface::GetVolume().GetTitleID((u8*)&m_TitleID);
m_TitleID = Common::swap64(m_TitleID);
DVDInterface::GetVolume().GetTitleID(&m_TitleID);
}
else
{
@@ -1100,8 +1099,8 @@ u32 CWII_IPC_HLE_Device_es::ES_DIVerify(u8* _pTMD, u32 _sz)
{
u64 titleID = 0xDEADBEEFDEADBEEFull;
u64 tmdTitleID = Common::swap64(*(u64*)(_pTMD+0x18c));
DVDInterface::GetVolume().GetTitleID((u8*)&titleID);
if (Common::swap64(titleID) != tmdTitleID)
DVDInterface::GetVolume().GetTitleID(&titleID);
if (titleID != tmdTitleID)
{
return -1;
}