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

@ -34,8 +34,9 @@ public:
DiscScrubber();
~DiscScrubber();
bool SetupScrub(const Volume* disc, int block_size);
size_t GetNextBlock(File::IOFile& in, u8* buffer);
bool SetupScrub(const Volume* disc);
// Returns true if the specified 32 KiB block only contains unused data
bool CanBlockBeScrubbed(u64 offset) const;
private:
@ -72,8 +73,6 @@ private:
std::vector<u8> m_free_table;
u64 m_file_size = 0;
u64 m_block_count = 0;
u32 m_block_size = 0;
bool m_is_scrubbing = false;
};