mirror of
https://github.com/86Box/86Box.git
synced 2026-02-22 09:35:32 -07:00
The remaining sizes for the indicator and proper functions for determining the playing and paused statuses of a CD-ROM drive.
This commit is contained in:
@@ -3224,6 +3224,22 @@ cdrom_is_empty(const uint8_t id)
|
||||
return ret;
|
||||
}
|
||||
|
||||
int
|
||||
cdrom_is_playing(const uint8_t id)
|
||||
{
|
||||
const cdrom_t *dev = &cdrom[id];
|
||||
|
||||
return (dev->cd_status == CD_STATUS_PLAYING);
|
||||
}
|
||||
|
||||
int
|
||||
cdrom_is_paused(const uint8_t id)
|
||||
{
|
||||
const cdrom_t *dev = &cdrom[id];
|
||||
|
||||
return (dev->cd_status == CD_STATUS_PAUSED);
|
||||
}
|
||||
|
||||
/* The mechanics of ejecting a CD-ROM from a drive. */
|
||||
void
|
||||
cdrom_eject(const uint8_t id)
|
||||
|
||||
@@ -481,6 +481,8 @@ extern void cdrom_close(void);
|
||||
extern void cdrom_insert(const uint8_t id);
|
||||
extern void cdrom_exit(const uint8_t id);
|
||||
extern int cdrom_is_empty(const uint8_t id);
|
||||
extern int cdrom_is_playing(const uint8_t id);
|
||||
extern int cdrom_is_paused(const uint8_t id);
|
||||
extern void cdrom_eject(const uint8_t id);
|
||||
extern void cdrom_reload(const uint8_t id);
|
||||
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 42 KiB After Width: | Height: | Size: 44 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 42 KiB After Width: | Height: | Size: 44 KiB |
@@ -534,11 +534,10 @@ MachineStatus::refreshIcons()
|
||||
d->fdd[i].setWriteActive(machine_status.fdd[i].write_active);
|
||||
}
|
||||
for (size_t i = 0; i < CDROM_NUM; ++i) {
|
||||
auto status = cdrom_get_current_status(&cdrom[i]);
|
||||
d->cdrom[i].setActive(machine_status.cdrom[i].active);
|
||||
d->cdrom[i].setWriteActive(machine_status.cdrom[i].write_active);
|
||||
d->cdrom[i].setPlay(status == 0x11);
|
||||
d->cdrom[i].setPause((!cdrom[i].is_chinon) ? (status == 0x12) : (status == 0x15));
|
||||
d->cdrom[i].setPlay(cdrom_is_playing(i));
|
||||
d->cdrom[i].setPause(cdrom_is_paused(i));
|
||||
if (machine_status.cdrom[i].active) {
|
||||
ui_sb_update_icon(SB_CDROM | i, 0);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user