summaryrefslogtreecommitdiff
path: root/Source/Core/DiscIO/VolumeWiiCrypted.cpp
diff options
context:
space:
mode:
authorJosJuice <josjuice@gmail.com>2017-05-20 18:58:12 +0200
committerJosJuice <josjuice@gmail.com>2017-05-20 20:43:31 +0200
commit26f5b53ecba0f27020d469b8d07767a9529a8d8a (patch)
treef3c2f3981882342d418b1ac7a42ac88b48a1b12b /Source/Core/DiscIO/VolumeWiiCrypted.cpp
parent5c68a03ae49176837a5f1d43d8dd780361c84b08 (diff)
VolumeWiiCrypted: Get title IDs from TicketReader
Diffstat (limited to 'Source/Core/DiscIO/VolumeWiiCrypted.cpp')
-rw-r--r--Source/Core/DiscIO/VolumeWiiCrypted.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/Source/Core/DiscIO/VolumeWiiCrypted.cpp b/Source/Core/DiscIO/VolumeWiiCrypted.cpp
index 30c90de2f5..a9345b4b94 100644
--- a/Source/Core/DiscIO/VolumeWiiCrypted.cpp
+++ b/Source/Core/DiscIO/VolumeWiiCrypted.cpp
@@ -224,7 +224,11 @@ Partition CVolumeWiiCrypted::GetGamePartition() const
bool CVolumeWiiCrypted::GetTitleID(u64* buffer, const Partition& partition) const
{
- return m_pReader->ReadSwapped(partition.offset + 0x1DC, buffer);
+ const IOS::ES::TicketReader& ticket = GetTicket(partition);
+ if (!ticket.IsValid())
+ return false;
+ *buffer = ticket.GetTitleId();
+ return true;
}
const IOS::ES::TicketReader& CVolumeWiiCrypted::GetTicket(const Partition& partition) const