diff options
| author | Tillmann Karras <tilkax@gmail.com> | 2015-09-17 10:58:38 +0200 |
|---|---|---|
| committer | Tillmann Karras <tilkax@gmail.com> | 2015-10-12 02:33:38 +0200 |
| commit | efe71e686b8b89e87e2c10237e4d33bc4bfdf54f (patch) | |
| tree | 3d0530888f701162ffcfbfc663192f1081811bec | |
| parent | 1a8e2e16e36caa69a6d8fef5bda8924e2e758255 (diff) | |
DiscIO: implement CISOBlob::GetDataSize()
This is a best-effort approach, since the CISO format does not save the
original file size.
| -rw-r--r-- | Source/Core/DiscIO/CISOBlob.cpp | 2 | ||||
| -rw-r--r-- | Source/Core/DiscIO/CISOBlob.h | 4 |
2 files changed, 5 insertions, 1 deletions
diff --git a/Source/Core/DiscIO/CISOBlob.cpp b/Source/Core/DiscIO/CISOBlob.cpp index fa9b30e2f5..f9947d0e6c 100644 --- a/Source/Core/DiscIO/CISOBlob.cpp +++ b/Source/Core/DiscIO/CISOBlob.cpp @@ -44,7 +44,7 @@ CISOFileReader* CISOFileReader::Create(const std::string& filename) u64 CISOFileReader::GetDataSize() const { - return GetRawSize(); + return CISO_MAP_SIZE * m_block_size; } u64 CISOFileReader::GetRawSize() const diff --git a/Source/Core/DiscIO/CISOBlob.h b/Source/Core/DiscIO/CISOBlob.h index a1b5ae5cb7..dd0095f5a4 100644 --- a/Source/Core/DiscIO/CISOBlob.h +++ b/Source/Core/DiscIO/CISOBlob.h @@ -37,7 +37,11 @@ public: static CISOFileReader* Create(const std::string& filename); BlobType GetBlobType() const override { return BlobType::CISO; } + + // The CISO format does not save the original file size. + // This function returns an upper bound. u64 GetDataSize() const override; + u64 GetRawSize() const override; bool Read(u64 offset, u64 nbytes, u8* out_ptr) override; |
