Fixed a bug in the DOSBox track position return code to no longer incorrectly offset the relative position by 150 sectors (2 frames), fixes track time counters in Sony CD Player for DOS and DOS Navigator.

This commit is contained in:
OBattler
2017-05-19 00:25:16 +02:00
parent c3c1b3eba1
commit 03587514bb
5 changed files with 22 additions and 26 deletions

View File

@@ -53,8 +53,12 @@ void ioctl_audio_callback(uint8_t id, int16_t *output, int len)
RAW_READ_INFO in;
DWORD count;
if (cdrom_ioctl[id].cd_state != CD_PLAYING)
if (!cdrom_drives[id].sound_on || (cdrom_ioctl[id].cd_state != CD_PLAYING))
{
if (cdrom_ioctl[id].cd_state == CD_PLAYING)
{
cdrom[id].seek_pos += (len >> 11);
}
memset(output, 0, len * 2);
return;
}
@@ -395,7 +399,7 @@ static uint8_t ioctl_getcurrentsubchannel(uint8_t id, uint8_t *b, int msf)
if (msf)
{
dat = cdpos;
dat = cdpos + 150;
b[pos + 3] = (uint8_t)(dat % 75); dat /= 75;
b[pos + 2] = (uint8_t)(dat % 60); dat /= 60;
b[pos + 1] = (uint8_t)dat;