diff options
| author | flacs <tilkax@gmail.com> | 2015-09-23 18:56:57 +0200 |
|---|---|---|
| committer | flacs <tilkax@gmail.com> | 2015-09-23 18:56:57 +0200 |
| commit | c1ee0e7829a4062b503eb36aa50d0fbeec9d5734 (patch) | |
| tree | 9885ec1ff75da298a6a3a8a54776f0932cd516c1 /Source/Core/DiscIO/VolumeWiiCrypted.cpp | |
| parent | cf131b133ed81382d893a357e18ab07d4d8b4505 (diff) | |
| parent | 4b9b82e00016cbb8aa3c8a45bd32aea460f28c07 (diff) | |
Merge pull request #3078 from lioncash/titleid
DiscIO: Do swapping in GetTitleID implementations
Diffstat (limited to 'Source/Core/DiscIO/VolumeWiiCrypted.cpp')
| -rw-r--r-- | Source/Core/DiscIO/VolumeWiiCrypted.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/Source/Core/DiscIO/VolumeWiiCrypted.cpp b/Source/Core/DiscIO/VolumeWiiCrypted.cpp index 96fe209d0d..aa7f36da64 100644 --- a/Source/Core/DiscIO/VolumeWiiCrypted.cpp +++ b/Source/Core/DiscIO/VolumeWiiCrypted.cpp @@ -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 |
