summaryrefslogtreecommitdiff
path: root/Source/Core/DiscIO/Src/NANDContentLoader.cpp
diff options
context:
space:
mode:
authorfires.gc <fires.gc@gmail.com>2009-02-28 01:59:09 +0000
committerfires.gc <fires.gc@gmail.com>2009-02-28 01:59:09 +0000
commit9ecd02510714c7c26ffec4245b29981bb9584276 (patch)
tree0c872127a9198ff2f23517ba5d6eefe30562ce53 /Source/Core/DiscIO/Src/NANDContentLoader.cpp
parentcbd5345696a6808df8b53fc3963343fd544b221b (diff)
...
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@2462 8ced0084-cf51-0410-be5f-012b33b47a6e
Diffstat (limited to 'Source/Core/DiscIO/Src/NANDContentLoader.cpp')
-rw-r--r--Source/Core/DiscIO/Src/NANDContentLoader.cpp22
1 files changed, 9 insertions, 13 deletions
diff --git a/Source/Core/DiscIO/Src/NANDContentLoader.cpp b/Source/Core/DiscIO/Src/NANDContentLoader.cpp
index 5ba850866c..8ae3ac14dc 100644
--- a/Source/Core/DiscIO/Src/NANDContentLoader.cpp
+++ b/Source/Core/DiscIO/Src/NANDContentLoader.cpp
@@ -75,10 +75,10 @@ CNANDContentLoader::~CNANDContentLoader()
SNANDContent* CNANDContentLoader::GetContentByIndex(int _Index)
{
- for (size_t i=0; i<m_TitleMetaContent.size(); i++)
+ for (size_t i=0; i<m_Content.size(); i++)
{
- if (m_TitleMetaContent[i].m_Index == _Index)
- return &m_TitleMetaContent[i];
+ if (m_Content[i].m_Index == _Index)
+ return &m_Content[i];
}
return NULL;
}
@@ -89,13 +89,9 @@ bool CNANDContentLoader::CreateFromWAD(const std::string& _rName)
if (pReader == NULL)
return false;
- if (!ParseWAD(*pReader))
- {
- delete pReader;
- return false;
- }
+ bool Result = ParseWAD(*pReader);
delete pReader;
- return true;
+ return Result;
}
bool CNANDContentLoader::CreateFromDirectory(const std::string& _rPath)
@@ -117,11 +113,11 @@ bool CNANDContentLoader::CreateFromDirectory(const std::string& _rPath)
m_BootIndex = Common::swap16(pTMD + 0x01e0);
m_TitleID = Common::swap64(pTMD + 0x018C);
- m_TitleMetaContent.resize(numEntries);
+ m_Content.resize(numEntries);
for (u32 i = 0; i < numEntries; i++)
{
- SNANDContent& rContent = m_TitleMetaContent[i];
+ SNANDContent& rContent = m_Content[i];
rContent.m_ContentID = Common::swap32(pTMD + 0x01e4 + 0x24*i);
rContent.m_Index = Common::swap16(pTMD + 0x01e8 + 0x24*i);
@@ -224,11 +220,11 @@ bool CNANDContentLoader::ParseTMD(u8* pDataApp, u32 pDataAppSize, u8* pTicket, u
u8* p = pDataApp;
- m_TitleMetaContent.resize(numEntries);
+ m_Content.resize(numEntries);
for (u32 i=0; i<numEntries; i++)
{
- SNANDContent& rContent = m_TitleMetaContent[i];
+ SNANDContent& rContent = m_Content[i];
rContent.m_ContentID = Common::swap32(pTMD + 0x01e4 + 0x24*i);
rContent.m_Index = Common::swap16(pTMD + 0x01e8 + 0x24*i);