mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-25 15:19:42 -06:00
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:
@ -23,11 +23,15 @@ class DriveReader : public SectorReader
|
||||
public:
|
||||
static std::unique_ptr<DriveReader> Create(const std::string& drive);
|
||||
~DriveReader();
|
||||
|
||||
BlobType GetBlobType() const override { return BlobType::DRIVE; }
|
||||
|
||||
u64 GetRawSize() const override { return m_size; }
|
||||
u64 GetDataSize() const override { return m_size; }
|
||||
bool IsDataSizeAccurate() const override { return true; }
|
||||
|
||||
u64 GetBlockSize() const override { return ECC_BLOCK_SIZE; }
|
||||
|
||||
private:
|
||||
DriveReader(const std::string& drive);
|
||||
bool GetBlock(u64 block_num, u8* out_ptr) override;
|
||||
@ -41,6 +45,7 @@ private:
|
||||
File::IOFile m_file;
|
||||
bool IsOK() const { return m_file.IsOpen() && m_file.IsGood(); }
|
||||
#endif
|
||||
static constexpr u64 ECC_BLOCK_SIZE = 0x8000;
|
||||
u64 m_size = 0;
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user