CDROM: Fix intermediate seek->read status transition

This commit is contained in:
Connor McLaughlin
2021-06-29 19:29:58 +10:00
parent 911e9a37f1
commit 37e50c62f0
2 changed files with 19 additions and 12 deletions

View File

@ -200,6 +200,19 @@ private:
/// Clears the CDDA/seeking bits.
ALWAYS_INLINE void ClearActiveBits() { bits &= ~(STAT_SEEKING | STAT_READING | STAT_PLAYING_CDDA); }
/// Sets the bits for seeking.
ALWAYS_INLINE void SetSeeking()
{
bits = (bits & ~(STAT_READING | STAT_PLAYING_CDDA)) | (STAT_MOTOR_ON | STAT_SEEKING);
}
/// Sets the bits for reading/playing.
ALWAYS_INLINE void SetReadingBits(bool audio)
{
bits = (bits & ~(STAT_SEEKING | STAT_READING | STAT_PLAYING_CDDA)) |
((audio) ? (STAT_MOTOR_ON | STAT_PLAYING_CDDA) : (STAT_MOTOR_ON | STAT_READING));
}
};
union ModeRegister