mirror of
https://github.com/WinampDesktop/winamp.git
synced 2025-04-27 14:55:41 -04:00
CDROM: Header valid/playing should not be set on SeekL
Fixes Syphon Filter locking up on boot.
This commit is contained in:
parent
9da4e642af
commit
5d0a6f88ad
@ -1125,7 +1125,7 @@ void CDROM::DoSeekComplete()
|
|||||||
seek_okay &= m_media->Seek(m_media->GetPositionOnDisc() - 1);
|
seek_okay &= m_media->Seek(m_media->GetPositionOnDisc() - 1);
|
||||||
if (seek_okay)
|
if (seek_okay)
|
||||||
{
|
{
|
||||||
ProcessDataSectorHeader(raw_sector);
|
ProcessDataSectorHeader(raw_sector, false);
|
||||||
|
|
||||||
// ensure the location matches up (it should)
|
// ensure the location matches up (it should)
|
||||||
const auto [seek_mm, seek_ss, seek_ff] = m_seek_position.ToBCD();
|
const auto [seek_mm, seek_ss, seek_ff] = m_seek_position.ToBCD();
|
||||||
@ -1280,18 +1280,17 @@ void CDROM::DoSectorRead()
|
|||||||
m_system->SetDowncount(m_drive_remaining_ticks);
|
m_system->SetDowncount(m_drive_remaining_ticks);
|
||||||
}
|
}
|
||||||
|
|
||||||
void CDROM::ProcessDataSectorHeader(const u8* raw_sector)
|
void CDROM::ProcessDataSectorHeader(const u8* raw_sector, bool set_valid)
|
||||||
{
|
{
|
||||||
std::memcpy(&m_last_sector_header, &raw_sector[SECTOR_SYNC_SIZE], sizeof(m_last_sector_header));
|
std::memcpy(&m_last_sector_header, &raw_sector[SECTOR_SYNC_SIZE], sizeof(m_last_sector_header));
|
||||||
std::memcpy(&m_last_sector_subheader, &raw_sector[SECTOR_SYNC_SIZE + sizeof(m_last_sector_header)],
|
std::memcpy(&m_last_sector_subheader, &raw_sector[SECTOR_SYNC_SIZE + sizeof(m_last_sector_header)],
|
||||||
sizeof(m_last_sector_subheader));
|
sizeof(m_last_sector_subheader));
|
||||||
|
m_secondary_status.header_valid |= set_valid;
|
||||||
m_secondary_status.header_valid = true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void CDROM::ProcessDataSector(const u8* raw_sector, const CDImage::SubChannelQ& subq)
|
void CDROM::ProcessDataSector(const u8* raw_sector, const CDImage::SubChannelQ& subq)
|
||||||
{
|
{
|
||||||
ProcessDataSectorHeader(raw_sector);
|
ProcessDataSectorHeader(raw_sector, true);
|
||||||
|
|
||||||
Log_DevPrintf("Read sector %u: mode %u submode 0x%02X", m_media->GetPositionOnDisc() - 1,
|
Log_DevPrintf("Read sector %u: mode %u submode 0x%02X", m_media->GetPositionOnDisc() - 1,
|
||||||
ZeroExtend32(m_last_sector_header.sector_mode), ZeroExtend32(m_last_sector_subheader.submode.bits));
|
ZeroExtend32(m_last_sector_header.sector_mode), ZeroExtend32(m_last_sector_subheader.submode.bits));
|
||||||
|
@ -206,7 +206,7 @@ private:
|
|||||||
void DoIDRead();
|
void DoIDRead();
|
||||||
void DoTOCRead();
|
void DoTOCRead();
|
||||||
void DoSectorRead();
|
void DoSectorRead();
|
||||||
void ProcessDataSectorHeader(const u8* raw_sector);
|
void ProcessDataSectorHeader(const u8* raw_sector, bool set_valid);
|
||||||
void ProcessDataSector(const u8* raw_sector, const CDImage::SubChannelQ& subq);
|
void ProcessDataSector(const u8* raw_sector, const CDImage::SubChannelQ& subq);
|
||||||
void ProcessXAADPCMSector(const u8* raw_sector, const CDImage::SubChannelQ& subq);
|
void ProcessXAADPCMSector(const u8* raw_sector, const CDImage::SubChannelQ& subq);
|
||||||
void ProcessCDDASector(const u8* raw_sector, const CDImage::SubChannelQ& subq);
|
void ProcessCDDASector(const u8* raw_sector, const CDImage::SubChannelQ& subq);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user