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 ECountry GetCountry() const = 0;
virtual u64 GetSize() const = 0; virtual u64 GetSize() const = 0;
// Size on disc (compressed size)
virtual u64 GetRawSize() const = 0;
}; };
// Generic Switch function for all volumes // Generic Switch function for all volumes

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -43,6 +43,7 @@ public:
std::string GetApploaderDate() const { return "0"; } std::string GetApploaderDate() const { return "0"; }
ECountry GetCountry() const; ECountry GetCountry() const;
u64 GetSize() const; u64 GetSize() const;
u64 GetRawSize() const;
private: private:
IBlobReader* m_pReader; 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 bool CVolumeWiiCrypted::CheckIntegrity() const
{ {
// Get partition data size // Get partition data size

View File

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

View File

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