mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-29 17:19:44 -06:00
Merge pull request #2015 from Stevoisiak/WAD-Version-Check
VolumeWad: Return version number for WADs
This commit is contained in:
@ -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;
|
||||
|
@ -36,6 +36,7 @@ public:
|
||||
ECountry GetCountry() const override;
|
||||
u64 GetSize() const override;
|
||||
u64 GetRawSize() const override;
|
||||
int GetRevision() const override;
|
||||
|
||||
private:
|
||||
std::unique_ptr<IBlobReader> m_pReader;
|
||||
|
Reference in New Issue
Block a user