summaryrefslogtreecommitdiff
path: root/Source/Core/DiscIO
diff options
context:
space:
mode:
authorJordan Woyak <jordan.woyak@gmail.com>2013-04-09 12:58:56 -0500
committerJordan Woyak <jordan.woyak@gmail.com>2013-04-09 12:58:56 -0500
commit98d35e590e25fdc3b42767f77ffef085d56ad451 (patch)
tree8a0fde17f02d15a60bcc5b5fed7d981d1a4a5d82 /Source/Core/DiscIO
parent018282c2b9f2c0f128b0ae6ce9157ae01de5c4d5 (diff)
Fixed split WBFS file size display. (probably)
Fixed issue 6222.
Diffstat (limited to 'Source/Core/DiscIO')
-rw-r--r--Source/Core/DiscIO/Src/Volume.h3
-rw-r--r--Source/Core/DiscIO/Src/VolumeDirectory.cpp4
-rw-r--r--Source/Core/DiscIO/Src/VolumeDirectory.h1
-rw-r--r--Source/Core/DiscIO/Src/VolumeGC.cpp8
-rw-r--r--Source/Core/DiscIO/Src/VolumeGC.h1
-rw-r--r--Source/Core/DiscIO/Src/VolumeWad.cpp10
-rw-r--r--Source/Core/DiscIO/Src/VolumeWad.h1
-rw-r--r--Source/Core/DiscIO/Src/VolumeWiiCrypted.cpp12
-rw-r--r--Source/Core/DiscIO/Src/VolumeWiiCrypted.h1
9 files changed, 40 insertions, 1 deletions
diff --git a/Source/Core/DiscIO/Src/Volume.h b/Source/Core/DiscIO/Src/Volume.h
index c19aaf93a8..431fa26427 100644
--- a/Source/Core/DiscIO/Src/Volume.h
+++ b/Source/Core/DiscIO/Src/Volume.h
@@ -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
diff --git a/Source/Core/DiscIO/Src/VolumeDirectory.cpp b/Source/Core/DiscIO/Src/VolumeDirectory.cpp
index be7cdeb565..46b616f534 100644
--- a/Source/Core/DiscIO/Src/VolumeDirectory.cpp
+++ b/Source/Core/DiscIO/Src/VolumeDirectory.cpp
@@ -240,6 +240,10 @@ u64 CVolumeDirectory::GetSize() const
return 0;
}
+u64 CVolumeDirectory::GetRawSize() const
+{
+ return GetSize();
+}
std::string CVolumeDirectory::ExtractDirectoryName(const std::string& _rDirectory)
{
diff --git a/Source/Core/DiscIO/Src/VolumeDirectory.h b/Source/Core/DiscIO/Src/VolumeDirectory.h
index 4e28d6460f..8ee8ee0ca4 100644
--- a/Source/Core/DiscIO/Src/VolumeDirectory.h
+++ b/Source/Core/DiscIO/Src/VolumeDirectory.h
@@ -60,6 +60,7 @@ public:
ECountry GetCountry() const;
u64 GetSize() const;
+ u64 GetRawSize() const;
void BuildFST();
diff --git a/Source/Core/DiscIO/Src/VolumeGC.cpp b/Source/Core/DiscIO/Src/VolumeGC.cpp
index 6210172790..a4e9340ae3 100644
--- a/Source/Core/DiscIO/Src/VolumeGC.cpp
+++ b/Source/Core/DiscIO/Src/VolumeGC.cpp
@@ -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;
diff --git a/Source/Core/DiscIO/Src/VolumeGC.h b/Source/Core/DiscIO/Src/VolumeGC.h
index d7729ee04c..8552dad909 100644
--- a/Source/Core/DiscIO/Src/VolumeGC.h
+++ b/Source/Core/DiscIO/Src/VolumeGC.h
@@ -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&);
diff --git a/Source/Core/DiscIO/Src/VolumeWad.cpp b/Source/Core/DiscIO/Src/VolumeWad.cpp
index a10e5bdb42..751e053f49 100644
--- a/Source/Core/DiscIO/Src/VolumeWad.cpp
+++ b/Source/Core/DiscIO/Src/VolumeWad.cpp
@@ -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;
}
diff --git a/Source/Core/DiscIO/Src/VolumeWad.h b/Source/Core/DiscIO/Src/VolumeWad.h
index afc16766a2..bda4e502cf 100644
--- a/Source/Core/DiscIO/Src/VolumeWad.h
+++ b/Source/Core/DiscIO/Src/VolumeWad.h
@@ -43,6 +43,7 @@ public:
std::string GetApploaderDate() const { return "0"; }
ECountry GetCountry() const;
u64 GetSize() const;
+ u64 GetRawSize() const;
private:
IBlobReader* m_pReader;
diff --git a/Source/Core/DiscIO/Src/VolumeWiiCrypted.cpp b/Source/Core/DiscIO/Src/VolumeWiiCrypted.cpp
index 32aa92bd08..1dcf30abf2 100644
--- a/Source/Core/DiscIO/Src/VolumeWiiCrypted.cpp
+++ b/Source/Core/DiscIO/Src/VolumeWiiCrypted.cpp
@@ -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
diff --git a/Source/Core/DiscIO/Src/VolumeWiiCrypted.h b/Source/Core/DiscIO/Src/VolumeWiiCrypted.h
index 56c2a8a363..b60f138596 100644
--- a/Source/Core/DiscIO/Src/VolumeWiiCrypted.h
+++ b/Source/Core/DiscIO/Src/VolumeWiiCrypted.h
@@ -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;