DiscIO: implement CISOBlob::GetDataSize()
This is a best-effort approach, since the CISO format does not save the original file size.
This commit is contained in:
parent
1a8e2e16e3
commit
efe71e686b
|
@ -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
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
Loading…
Reference in New Issue