CDImage: Add helper for checking for SBI
This commit is contained in:
@ -14,6 +14,7 @@ public:
|
||||
bool Open(const char* filename);
|
||||
|
||||
bool ReadSubChannelQ(SubChannelQ* subq) override;
|
||||
bool HasNonStandardSubchannel() const override;
|
||||
|
||||
protected:
|
||||
bool ReadSectorFromIndex(void* buffer, const Index& index, LBA lba_in_index) override;
|
||||
@ -103,6 +104,11 @@ bool CDImageBin::ReadSubChannelQ(SubChannelQ* subq)
|
||||
return CDImage::ReadSubChannelQ(subq);
|
||||
}
|
||||
|
||||
bool CDImageBin::HasNonStandardSubchannel() const
|
||||
{
|
||||
return (m_sbi.GetReplacementSectorCount() > 0);
|
||||
}
|
||||
|
||||
bool CDImageBin::ReadSectorFromIndex(void* buffer, const Index& index, LBA lba_in_index)
|
||||
{
|
||||
const u64 file_position = index.file_offset + (static_cast<u64>(lba_in_index) * index.file_sector_size);
|
||||
|
||||
Reference in New Issue
Block a user