VolumeWad: Return version number for WADs

This commit is contained in:
Stevoisiak 2015-01-30 20:43:48 -05:00 committed by Stevoisiak
parent a2b872b9da
commit b578abfbaa
4 changed files with 14 additions and 2 deletions

View File

@ -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;

View File

@ -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;

View File

@ -26,7 +26,7 @@
#include "DolphinQt/Utils/Resources.h"
#include "DolphinQt/Utils/Utils.h"
static const u32 CACHE_REVISION = 0x003;
static const u32 CACHE_REVISION = 0x004;
static const u32 DATASTREAM_REVISION = 15; // Introduced in Qt 5.2
static QStringList VectorToStringList(std::vector<std::string> vec, bool trim = false)

View File

@ -37,7 +37,7 @@
#include "DolphinWX/ISOFile.h"
#include "DolphinWX/WxUtils.h"
static const u32 CACHE_REVISION = 0x119;
static const u32 CACHE_REVISION = 0x120;
#define DVD_BANNER_WIDTH 96
#define DVD_BANNER_HEIGHT 32