diff options
| author | Stevoisiak <S.Vascellaro@gmail.com> | 2015-01-30 20:43:48 -0500 |
|---|---|---|
| committer | Stevoisiak <Stevoisiak@gmail.com> | 2015-02-05 11:27:57 -0500 |
| commit | b578abfbaa8a170396da3c834060e1def570c368 (patch) | |
| tree | 8b6e9ed06ee209c5e27dc264b7f0908a20bdbc89 /Source/Core/DiscIO/VolumeWad.cpp | |
| parent | a2b872b9da5577632bc0f13d56930fbbe3376093 (diff) | |
VolumeWad: Return version number for WADs
Diffstat (limited to 'Source/Core/DiscIO/VolumeWad.cpp')
| -rw-r--r-- | Source/Core/DiscIO/VolumeWad.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/Source/Core/DiscIO/VolumeWad.cpp b/Source/Core/DiscIO/VolumeWad.cpp index 13fecce313..0e1f0c79b3 100644 --- a/Source/Core/DiscIO/VolumeWad.cpp +++ b/Source/Core/DiscIO/VolumeWad.cpp @@ -103,6 +103,17 @@ bool CVolumeWAD::GetTitleID(u8* _pBuffer) const return true; } +int CVolumeWAD::GetRevision() const +{ + u32 TmdOffset = ALIGN_40(m_hdr_size) + ALIGN_40(m_cert_size) + ALIGN_40(m_tick_size); + + u16 revision; + if (!m_pReader->Read(TmdOffset + 0x1dc, 2, (u8*)&revision)) + return 0; + + return Common::swap16(revision); +} + bool CVolumeWAD::IsWadFile() const { return true; |
