DiscIO: Allow converting from formats other than ISO and GCZ

The constant DESIRED_BUFFER_SIZE was determined by multiplying the
old hardcoded value 32 with the default GCZ block size 16 KiB.
Not sure if it actually is the best value, but it seems fine.
This commit is contained in:
JosJuice
2020-04-04 20:56:20 +02:00
parent 0a71dda8a0
commit 8a9597e32e
10 changed files with 80 additions and 96 deletions

View File

@ -24,6 +24,7 @@ public:
static std::unique_ptr<WbfsFileReader> Create(File::IOFile file, const std::string& path);
BlobType GetBlobType() const override { return BlobType::WBFS; }
u64 GetRawSize() const override { return m_size; }
// The WBFS format does not save the original file size.
// This function returns a constant upper bound
@ -31,6 +32,8 @@ public:
u64 GetDataSize() const override;
bool IsDataSizeAccurate() const override { return false; }
u64 GetBlockSize() const override { return m_wbfs_sector_size; }
bool Read(u64 offset, u64 nbytes, u8* out_ptr) override;
private: