mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-02-22 03:57:17 +01:00
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
|
u64 CISOFileReader::GetDataSize() const
|
||||||
{
|
{
|
||||||
return GetRawSize();
|
return CISO_MAP_SIZE * m_block_size;
|
||||||
}
|
}
|
||||||
|
|
||||||
u64 CISOFileReader::GetRawSize() const
|
u64 CISOFileReader::GetRawSize() const
|
||||||
|
@ -37,7 +37,11 @@ public:
|
|||||||
static CISOFileReader* Create(const std::string& filename);
|
static CISOFileReader* Create(const std::string& filename);
|
||||||
|
|
||||||
BlobType GetBlobType() const override { return BlobType::CISO; }
|
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 GetDataSize() const override;
|
||||||
|
|
||||||
u64 GetRawSize() const override;
|
u64 GetRawSize() const override;
|
||||||
bool Read(u64 offset, u64 nbytes, u8* out_ptr) override;
|
bool Read(u64 offset, u64 nbytes, u8* out_ptr) override;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user