ata/atapihle.cpp: clamp buffer size to word units in command packet

* fix CD audio playback in PC-based systems
This commit is contained in:
angelosa 2024-11-24 12:37:35 +01:00
parent be1236fcf8
commit 6f892bc2e3

View File

@ -106,7 +106,8 @@ void atapi_hle_device::fill_buffer()
case IDE_COMMAND_PACKET:
if (m_buffer_size >= m_data_size)
{
m_buffer_size = m_data_size;
// MSCDEX/SHSUCDX PC drivers wants the clamp for CD audio playback (29 bytes).
m_buffer_size = m_data_size & 0xfffe;
}
else
{