Fixed split WBFS file size display. (probably)

Fixed issue 6222.
This commit is contained in:
Jordan Woyak 2013-04-09 12:58:56 -05:00
parent 018282c2b9
commit 98d35e590e
10 changed files with 41 additions and 2 deletions

View file

@ -65,6 +65,9 @@ public:
virtual ECountry GetCountry() const = 0;
virtual u64 GetSize() const = 0;
// Size on disc (compressed size)
virtual u64 GetRawSize() const = 0;
};
// Generic Switch function for all volumes

View file

@ -240,6 +240,10 @@ u64 CVolumeDirectory::GetSize() const
return 0;
}
u64 CVolumeDirectory::GetRawSize() const
{
return GetSize();
}
std::string CVolumeDirectory::ExtractDirectoryName(const std::string& _rDirectory)
{

View file

@ -60,6 +60,7 @@ public:
ECountry GetCountry() const;
u64 GetSize() const;
u64 GetRawSize() const;
void BuildFST();

View file

@ -138,6 +138,14 @@ u64 CVolumeGC::GetSize() const
return 0;
}
u64 CVolumeGC::GetRawSize() const
{
if (m_pReader)
return m_pReader->GetRawSize();
else
return 0;
}
bool CVolumeGC::IsDiscTwo() const
{
bool discTwo;

View file

@ -39,6 +39,7 @@ public:
std::string GetApploaderDate() const;
ECountry GetCountry() const;
u64 GetSize() const;
u64 GetRawSize() const;
bool IsDiscTwo() const;
typedef std::string(*StringDecoder)(const std::string&);

View file

@ -149,7 +149,15 @@ std::vector<std::string> CVolumeWAD::GetNames() const
u64 CVolumeWAD::GetSize() const
{
if (m_pReader)
return (size_t)m_pReader->GetDataSize();
return m_pReader->GetDataSize();
else
return 0;
}
u64 CVolumeWAD::GetRawSize() const
{
if (m_pReader)
return m_pReader->GetRawSize();
else
return 0;
}

View file

@ -43,6 +43,7 @@ public:
std::string GetApploaderDate() const { return "0"; }
ECountry GetCountry() const;
u64 GetSize() const;
u64 GetRawSize() const;
private:
IBlobReader* m_pReader;

View file

@ -230,6 +230,18 @@ u64 CVolumeWiiCrypted::GetSize() const
}
}
u64 CVolumeWiiCrypted::GetRawSize() const
{
if (m_pReader)
{
return m_pReader->GetRawSize();
}
else
{
return 0;
}
}
bool CVolumeWiiCrypted::CheckIntegrity() const
{
// Get partition data size

View file

@ -42,6 +42,7 @@ public:
std::string GetApploaderDate() const;
ECountry GetCountry() const;
u64 GetSize() const;
u64 GetRawSize() const;
bool SupportsIntegrityCheck() const { return true; }
bool CheckIntegrity() const;

View file

@ -71,7 +71,7 @@ GameListItem::GameListItem(const std::string& _rFileName)
m_volume_names = pVolume->GetNames();
m_Country = pVolume->GetCountry();
m_FileSize = File::GetSize(_rFileName);
m_FileSize = pVolume->GetRawSize();
m_VolumeSize = pVolume->GetSize();
m_UniqueID = pVolume->GetUniqueID();