Small bugfix in cdrom.c, should fix ATAPI PIO sector reading again.

This commit is contained in:
OBattler
2017-10-16 06:41:26 +02:00
parent 5fdeba0b56
commit 5beaeef831

View File

@@ -2564,7 +2564,17 @@ cdrom_readtoc_fallback:
return; return;
} }
if (cdrom_current_mode(id) == 2)
{
cdrom[id].requested_blocks = max_len;
cdrom[id].packet_len = alloc_length; cdrom[id].packet_len = alloc_length;
}
else
{
cdrom[id].requested_blocks = 1;
cdrom[id].packet_len = max_len * alloc_length;
}
cdrom_set_buf_len(id, BufLen, &cdrom[id].packet_len); cdrom_set_buf_len(id, BufLen, &cdrom[id].packet_len);
if (cdrom[id].requested_blocks > 1) if (cdrom[id].requested_blocks > 1)