mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-23 06:09:50 -06:00
DiscIO: Replace IsDataSizeAccurate with GetDataSizeType
Previously, we had WBFS and CISO which both returned an upper bound of the size, and other formats which returned an accurate size. But now we also have NFS, which returns a lower bound of the size. To allow VolumeVerifier to make better informed decisions for NFS, let's use an enum instead of a bool for the type of data size a blob has.
This commit is contained in:
@ -43,6 +43,18 @@ enum class BlobType
|
||||
NFS,
|
||||
};
|
||||
|
||||
// If you convert an ISO file to another format and then call GetDataSize on it, what is the result?
|
||||
enum class DataSizeType
|
||||
{
|
||||
// The result is the same as for the ISO.
|
||||
Accurate,
|
||||
// The result is not larger than for the ISO. (It's usually a little smaller than for the ISO.)
|
||||
// Reads to offsets that are larger than the result will return some kind of "blank" data.
|
||||
LowerBound,
|
||||
// The result is not smaller than for the ISO. (It's usually much larger than for the ISO.)
|
||||
UpperBound,
|
||||
};
|
||||
|
||||
std::string GetName(BlobType blob_type, bool translate);
|
||||
|
||||
class BlobReader
|
||||
@ -54,7 +66,7 @@ public:
|
||||
|
||||
virtual u64 GetRawSize() const = 0;
|
||||
virtual u64 GetDataSize() const = 0;
|
||||
virtual bool IsDataSizeAccurate() const = 0;
|
||||
virtual DataSizeType GetDataSizeType() const = 0;
|
||||
|
||||
// Returns 0 if the format does not use blocks
|
||||
virtual u64 GetBlockSize() const = 0;
|
||||
|
Reference in New Issue
Block a user