More formatting and consistency fixes

This commit is contained in:
Stevoisiak
2014-11-14 14:46:49 -05:00
committed by Stevoisiak
parent 60e9301f40
commit 6da394a4d0
19 changed files with 33 additions and 55 deletions

View File

@ -19,13 +19,9 @@ class IVolume;
IBannerLoader* CreateBannerLoader(DiscIO::IFileSystem& _rFileSystem, DiscIO::IVolume *pVolume)
{
if (IsVolumeWiiDisc(pVolume) || IsVolumeWadFile(pVolume))
{
return new CBannerLoaderWii(pVolume);
}
if (_rFileSystem.IsValid())
{
return new CBannerLoaderGC(_rFileSystem, pVolume);
}
return nullptr;
}

View File

@ -129,7 +129,7 @@ private:
u8 m_TMDView[TMD_VIEW_SIZE];
u8 m_TMDHeader[TMD_HEADER_SIZE];
u32 m_TIKSize;
u8 *m_TIK;
u8* m_TIK;
u8 m_Country;
std::vector<SNANDContent> m_Content;
@ -267,19 +267,13 @@ bool CNANDContentLoader::Initialize(const std::string& _rName)
rContent.m_pData = nullptr;
if (rContent.m_Type & 0x8000) // shared app
{
rContent.m_Filename = CSharedContent::AccessInstance().GetFilenameFromSHA1(rContent.m_SHA1Hash);
}
else
{
rContent.m_Filename = StringFromFormat("%s/%08x.app", m_Path.c_str(), rContent.m_ContentID);
}
// Be graceful about incorrect tmds.
if (File::Exists(rContent.m_Filename))
{
rContent.m_Size = (u32) File::GetSize(rContent.m_Filename);
}
}
delete [] pTMD;
@ -484,13 +478,9 @@ u64 CNANDContentManager::Install_WiiWAD(std::string &fileName)
std::string APPFileName;
if (Content.m_Type & 0x8000) //shared
{
APPFileName = CSharedContent::AccessInstance().AddSharedContent(Content.m_SHA1Hash);
}
else
{
APPFileName = StringFromFormat("%s%08x.app", ContentPath.c_str(), Content.m_ContentID);
}
if (!File::Exists(APPFileName))
{
@ -522,7 +512,7 @@ u64 CNANDContentManager::Install_WiiWAD(std::string &fileName)
return TitleID;
}
bool Add_Ticket(u64 TitleID, const u8 *p_tik, u32 tikSize)
bool Add_Ticket(u64 TitleID, const u8* p_tik, u32 tikSize)
{
std::string TicketFileName = Common::GetTicketFileName(TitleID);
File::CreateFullPath(TicketFileName);

View File

@ -66,9 +66,7 @@ bool CVolumeWiiCrypted::Read(u64 _ReadOffset, u64 _Length, u8* _pBuffer) const
// read current block
if (!m_pReader->Read(m_VolumeOffset + m_dataOffset + Block * 0x8000, 0x8000, m_pBuffer))
{
return(false);
}
if (m_LastDecryptedBlockOffset != Block)
{