Fixed several CD-ROM-related status bar icon bugs;

CD-ROM set to host drive no longer gets reset to empty;
The CD audio thread initializer now ignores the mute status of the drives;
CD-ROM IOCTL audio handler is now more thread-safe;
Fixed CD-ROM image audio;
Added more sanity checks to memory read/write code in 808x.c;
Initial settings are now sane again.
This commit is contained in:
OBattler
2017-06-01 01:47:54 +02:00
parent 339f81b553
commit e6adf90e29
12 changed files with 193 additions and 117 deletions

View File

@@ -2111,6 +2111,12 @@ int cdrom_pre_execution_check(uint8_t id, uint8_t *cdb)
return 0;
}
if ((cdrom_drives[id].handler->status(id) == CD_STATUS_PLAYING) || (cdrom_drives[id].handler->status(id) == CD_STATUS_PAUSED))
{
ready = 1;
goto skip_ready_check;
}
if (cdrom_drives[id].handler->medium_changed(id))
{
/* cdrom_log("CD-ROM %i: Medium has changed...\n", id); */
@@ -2119,6 +2125,7 @@ int cdrom_pre_execution_check(uint8_t id, uint8_t *cdb)
ready = cdrom_drives[id].handler->ready(id);
skip_ready_check:
if (!ready && cdrom[id].unit_attention)
{
/* If the drive is not ready, there is no reason to keep the