CDImage: Fix compilation on Linux

This commit is contained in:
Connor McLaughlin 2021-06-01 22:04:25 +10:00
parent 246797cf5c
commit 3cb01bf23d
3 changed files with 7 additions and 4 deletions

View file

@ -396,7 +396,7 @@ bool CDImage::GenerateSubChannelQ(SubChannelQ* subq, LBA lba)
void CDImage::GenerateSubChannelQ(SubChannelQ* subq, const Index& index, u32 index_offset)
{
subq->control.bits = index.control.bits;
subq->control_bits = index.control.bits;
subq->track_number_bcd =
(index.track_number <= m_tracks.size() ? BinaryToBCD(index.track_number) : index.track_number);
subq->index_number_bcd = BinaryToBCD(index.index_number);

View file

@ -145,7 +145,7 @@ public:
struct
{
Control control;
u8 control_bits;
u8 track_number_bcd;
u8 index_number_bcd;
u8 relative_minute_bcd;
@ -162,6 +162,9 @@ public:
static u16 ComputeCRC(const Data& data);
Control GetControl() const { return Control{control_bits}; }
bool IsData() const { return GetControl().data; }
bool IsCRCValid() const;
SubChannelQ& operator=(const SubChannelQ& q)

View file

@ -1745,7 +1745,7 @@ bool CDROM::CompleteSeek()
subq.absolute_frame_bcd == seek_ff);
if (seek_okay)
{
if (subq.control.data)
if (subq.IsData())
{
if (logical)
{
@ -1969,7 +1969,7 @@ void CDROM::DoSectorRead()
return;
}
const bool is_data_sector = subq.control.data;
const bool is_data_sector = subq.IsData();
if (!is_data_sector)
{
if (m_play_track_number_bcd == 0)