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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user