diff options
| author | Tillmann Karras <tilkax@gmail.com> | 2015-09-17 10:58:54 +0200 |
|---|---|---|
| committer | Tillmann Karras <tilkax@gmail.com> | 2015-10-12 02:33:04 +0200 |
| commit | 1a8e2e16e36caa69a6d8fef5bda8924e2e758255 (patch) | |
| tree | 5338ab8a21f20435fe84787c5b1ee9a07f4ab497 /Source/Core | |
| parent | a92b4bda95fc7915bf61e94b310d8d90dfdaf632 (diff) | |
DiscIO: implement WbfsBlob::GetDataSize()
Diffstat (limited to 'Source/Core')
| -rw-r--r-- | Source/Core/DiscIO/WbfsBlob.cpp | 5 | ||||
| -rw-r--r-- | Source/Core/DiscIO/WbfsBlob.h | 7 |
2 files changed, 11 insertions, 1 deletions
diff --git a/Source/Core/DiscIO/WbfsBlob.cpp b/Source/Core/DiscIO/WbfsBlob.cpp index 33c4c90b53..7aaa09c8b1 100644 --- a/Source/Core/DiscIO/WbfsBlob.cpp +++ b/Source/Core/DiscIO/WbfsBlob.cpp @@ -51,6 +51,11 @@ WbfsFileReader::~WbfsFileReader() delete[] m_wlba_table; } +u64 WbfsFileReader::GetDataSize() const +{ + return WII_SECTOR_COUNT * WII_SECTOR_SIZE; +} + bool WbfsFileReader::OpenFiles(const std::string& filename) { m_total_files = 0; diff --git a/Source/Core/DiscIO/WbfsBlob.h b/Source/Core/DiscIO/WbfsBlob.h index d090ad461c..ce9d42953e 100644 --- a/Source/Core/DiscIO/WbfsBlob.h +++ b/Source/Core/DiscIO/WbfsBlob.h @@ -20,7 +20,12 @@ public: static WbfsFileReader* Create(const std::string& filename); BlobType GetBlobType() const override { return BlobType::WBFS; } - u64 GetDataSize() const override { return m_size; } + + // The WBFS format does not save the original file size. + // This function returns a constant upper bound + // (the size of a double-layer Wii disc). + u64 GetDataSize() const override; + u64 GetRawSize() const override { return m_size; } bool Read(u64 offset, u64 nbytes, u8* out_ptr) override; |
