mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-24 06:39:46 -06:00
fixed support for GetTMDViewSize and GetTMDView
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@2637 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
@ -177,14 +177,17 @@ bool CNANDContentLoader::CreateFromDirectory(const std::string& _rPath)
|
||||
fread(pTMD, Size, 1, pTMDFile);
|
||||
fclose(pTMDFile);
|
||||
|
||||
memcpy(m_TicketView, pTMD + 0x180, TICKET_VIEW_SIZE);
|
||||
|
||||
//////
|
||||
u32 numEntries = Common::swap16(pTMD + 0x01de);
|
||||
m_TileVersion = Common::swap16(pTMD + 0x01dc);
|
||||
m_numEntries = Common::swap16(pTMD + 0x01de);
|
||||
m_BootIndex = Common::swap16(pTMD + 0x01e0);
|
||||
m_TitleID = Common::swap64(pTMD + 0x018C);
|
||||
|
||||
m_Content.resize(numEntries);
|
||||
m_Content.resize(m_numEntries);
|
||||
|
||||
for (u32 i = 0; i < numEntries; i++)
|
||||
for (u32 i = 0; i < m_numEntries; i++)
|
||||
{
|
||||
SNANDContent& rContent = m_Content[i];
|
||||
|
||||
|
@ -49,14 +49,29 @@ public:
|
||||
u32 GetBootIndex() const { return m_BootIndex; }
|
||||
size_t GetContentSize() const { return m_Content.size(); }
|
||||
SNANDContent* GetContentByIndex(int _Index);
|
||||
const u8* GetTicket() const { return m_TicketView; }
|
||||
|
||||
const std::vector<SNANDContent>& GetContent() const { return m_Content; }
|
||||
|
||||
static bool IsWiiWAD(const std::string& _rName);
|
||||
|
||||
const u16 GetTitleVersion() const {return m_TileVersion;}
|
||||
const u16 GetNumEntries() const {return m_numEntries;}
|
||||
|
||||
|
||||
enum
|
||||
{
|
||||
TICKET_VIEW_SIZE = 0x58
|
||||
};
|
||||
|
||||
private:
|
||||
|
||||
bool m_Valid;
|
||||
u64 m_TitleID;
|
||||
u32 m_BootIndex;
|
||||
u16 m_numEntries;
|
||||
u16 m_TileVersion;
|
||||
u8 m_TicketView[TICKET_VIEW_SIZE];
|
||||
|
||||
std::vector<SNANDContent> m_Content;
|
||||
|
||||
|
Reference in New Issue
Block a user