summaryrefslogtreecommitdiff
path: root/Source/Core/DiscIO/VolumeWiiCrypted.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Source/Core/DiscIO/VolumeWiiCrypted.cpp')
-rw-r--r--Source/Core/DiscIO/VolumeWiiCrypted.cpp31
1 files changed, 2 insertions, 29 deletions
diff --git a/Source/Core/DiscIO/VolumeWiiCrypted.cpp b/Source/Core/DiscIO/VolumeWiiCrypted.cpp
index 32313dd4c2..73488bbb9c 100644
--- a/Source/Core/DiscIO/VolumeWiiCrypted.cpp
+++ b/Source/Core/DiscIO/VolumeWiiCrypted.cpp
@@ -46,18 +46,15 @@ bool CVolumeWiiCrypted::RAWRead( u64 _Offset, u64 _Length, u8* _pBuffer ) const
// Medal Of Honor Heroes 2 read this DVD offset for PartitionsInfo
// and, PartitionsInfo is not encrypted, let's read it directly.
if (!m_pReader->Read(_Offset, _Length, _pBuffer))
- {
return(false);
- }
- return true;
+ else
+ return true;
}
bool CVolumeWiiCrypted::Read(u64 _ReadOffset, u64 _Length, u8* _pBuffer) const
{
if (m_pReader == nullptr)
- {
return(false);
- }
while (_Length > 0)
{
@@ -118,16 +115,12 @@ void CVolumeWiiCrypted::GetTMD(u8* _pBuffer, u32 * _sz) const
std::string CVolumeWiiCrypted::GetUniqueID() const
{
if (m_pReader == nullptr)
- {
return std::string();
- }
char ID[7];
if (!Read(0, 6, (u8*)ID))
- {
return std::string();
- }
ID[6] = '\0';
@@ -149,16 +142,12 @@ IVolume::ECountry CVolumeWiiCrypted::GetCountry() const
std::string CVolumeWiiCrypted::GetMakerID() const
{
if (m_pReader == nullptr)
- {
return std::string();
- }
char makerID[3];
if (!Read(0x4, 0x2, (u8*)&makerID))
- {
return std::string();
- }
makerID[2] = '\0';
@@ -181,16 +170,12 @@ std::vector<std::string> CVolumeWiiCrypted::GetNames() const
u32 CVolumeWiiCrypted::GetFSTSize() const
{
if (m_pReader == nullptr)
- {
return 0;
- }
u32 size;
if (!Read(0x428, 0x4, (u8*)&size))
- {
return 0;
- }
return size;
}
@@ -198,16 +183,12 @@ u32 CVolumeWiiCrypted::GetFSTSize() const
std::string CVolumeWiiCrypted::GetApploaderDate() const
{
if (m_pReader == nullptr)
- {
return std::string();
- }
char date[16];
if (!Read(0x2440, 0x10, (u8*)&date))
- {
return std::string();
- }
date[10] = '\0';
@@ -217,25 +198,17 @@ std::string CVolumeWiiCrypted::GetApploaderDate() const
u64 CVolumeWiiCrypted::GetSize() const
{
if (m_pReader)
- {
return m_pReader->GetDataSize();
- }
else
- {
return 0;
- }
}
u64 CVolumeWiiCrypted::GetRawSize() const
{
if (m_pReader)
- {
return m_pReader->GetRawSize();
- }
else
- {
return 0;
- }
}
bool CVolumeWiiCrypted::CheckIntegrity() const