summaryrefslogtreecommitdiff
path: root/Source/Core/DiscIO/Src/NANDContentLoader.cpp
diff options
context:
space:
mode:
authorLioncash <mathew1800@gmail.com>2013-04-16 23:14:36 -0400
committerLioncash <mathew1800@gmail.com>2013-04-16 23:14:36 -0400
commit2316cb6876e6d79584ce0cc50771d2fb8495fe45 (patch)
tree325aefd07068f7163d5616347cec36e6fac5754e /Source/Core/DiscIO/Src/NANDContentLoader.cpp
parentf4986862892d437bfcd1cc475ebe7af97c6923d8 (diff)
Remove all tab/space mismatches from the Core project. For anyone working on a branch that heavily involves the core, I am so sorry.
- Also killed off some trailing spaces/tabs. - Updated the license header to be consistent with the rest of the project (All projects are now done moving over to this) - Also, killed some dangling else's (where appropriate) Now all the tab fixing is done. No more of this crap should be needed to be pushed. Rejoice!
Diffstat (limited to 'Source/Core/DiscIO/Src/NANDContentLoader.cpp')
-rw-r--r--Source/Core/DiscIO/Src/NANDContentLoader.cpp17
1 files changed, 10 insertions, 7 deletions
diff --git a/Source/Core/DiscIO/Src/NANDContentLoader.cpp b/Source/Core/DiscIO/Src/NANDContentLoader.cpp
index b60e5ae94a..36e1e959f5 100644
--- a/Source/Core/DiscIO/Src/NANDContentLoader.cpp
+++ b/Source/Core/DiscIO/Src/NANDContentLoader.cpp
@@ -260,17 +260,18 @@ bool CNANDContentLoader::Initialize(const std::string& _rName)
rContent.m_Size= (u32)Common::swap64(pTMD + 0x01ec + 0x24*i);
memcpy(rContent.m_SHA1Hash, pTMD + 0x01f4 + 0x24*i, 20);
memcpy(rContent.m_Header, pTMD + 0x01e4 + 0x24*i, 36);
+
if (m_isWAD)
{
- u32 RoundedSize = ROUND_UP(rContent.m_Size, 0x40);
- rContent.m_pData = new u8[RoundedSize];
+ u32 RoundedSize = ROUND_UP(rContent.m_Size, 0x40);
+ rContent.m_pData = new u8[RoundedSize];
- memset(IV, 0, sizeof IV);
- memcpy(IV, pTMD + 0x01e8 + 0x24*i, 2);
- AESDecode(DecryptTitleKey, IV, pDataApp, RoundedSize, rContent.m_pData);
+ memset(IV, 0, sizeof IV);
+ memcpy(IV, pTMD + 0x01e8 + 0x24*i, 2);
+ AESDecode(DecryptTitleKey, IV, pDataApp, RoundedSize, rContent.m_pData);
- pDataApp += RoundedSize;
- continue;
+ pDataApp += RoundedSize;
+ continue;
}
rContent.m_pData = NULL;
@@ -282,7 +283,9 @@ bool CNANDContentLoader::Initialize(const std::string& _rName)
strcpy(szFilename, Filename.c_str());
}
else
+ {
sprintf(szFilename, "%s/%08x.app", m_Path.c_str(), rContent.m_ContentID);
+ }
INFO_LOG(DISCIO, "NANDContentLoader: load %s", szFilename);