Use ESFormats for TMDs

We already have a TMDReader, so let's actually use it.

And move ESFormats to IOS::ES, since it's definitely part of IOS.
This adds a DiscIO dependency on Core which will be fixed in a
follow-up PR.
This commit is contained in:
Léo Lam
2017-02-11 08:57:47 +01:00
parent bf1f70db0a
commit c1a139e8ac
26 changed files with 337 additions and 356 deletions

View File

@ -114,7 +114,7 @@ bool CVolumeWiiCrypted::GetTitleID(u64* buffer) const
return true;
}
std::vector<u8> CVolumeWiiCrypted::GetTMD() const
IOS::ES::TMDReader CVolumeWiiCrypted::GetTMD() const
{
u32 tmd_size;
u32 tmd_address;
@ -137,7 +137,7 @@ std::vector<u8> CVolumeWiiCrypted::GetTMD() const
std::vector<u8> buffer(tmd_size);
Read(m_VolumeOffset + tmd_address, tmd_size, buffer.data(), false);
return buffer;
return IOS::ES::TMDReader{std::move(buffer)};
}
u64 CVolumeWiiCrypted::PartitionOffsetToRawOffset(u64 offset) const