- turn on status bar LEDs after restore if necessary

This commit is contained in:
Volker Ruppert 2012-10-03 09:09:04 +00:00
parent a0852c83b9
commit 16ee7f8936
2 changed files with 13 additions and 0 deletions

View File

@ -392,6 +392,18 @@ void bx_floppy_ctrl_c::register_state(void)
}
}
void bx_floppy_ctrl_c::after_restore_state(void)
{
if (BX_FD_THIS s.statusbar_id[0] >= 0) {
if ((BX_FD_THIS s.DOR & 0x10) > 0)
bx_gui->statusbar_setitem(BX_FD_THIS s.statusbar_id[0], 1);
}
if (BX_FD_THIS s.statusbar_id[1] >= 0) {
if ((BX_FD_THIS s.DOR & 0x20) > 0)
bx_gui->statusbar_setitem(BX_FD_THIS s.statusbar_id[1], 1);
}
}
void bx_floppy_ctrl_c::runtime_config_handler(void *this_ptr)
{
bx_floppy_ctrl_c *class_ptr = (bx_floppy_ctrl_c *) this_ptr;

View File

@ -54,6 +54,7 @@ public:
virtual void reset(unsigned type);
virtual unsigned set_media_status(unsigned drive, bx_bool status);
virtual void register_state(void);
virtual void after_restore_state(void);
#if BX_DEBUGGER
virtual void debug_dump(int argc, char **argv);
#endif