Write-protected indicator (part 1)

This commit is contained in:
Cacodemon345
2025-07-21 01:20:54 +06:00
parent 174e92dad9
commit 6b2e58d3b4
12 changed files with 98 additions and 8 deletions

View File

@@ -262,6 +262,34 @@ ui_sb_set_ready(int ready)
}
}
void
ui_sb_update_icon_wp(int tag, int state)
{
const auto temp = static_cast<unsigned int>(tag);
const int category = static_cast<int>(temp & 0xfffffff0);
const int item = tag & 0xf;
switch (category) {
default:
break;
case SB_CASSETTE:
machine_status.cassette.write_prot = state > 0 ? true : false;
break;
case SB_FLOPPY:
machine_status.fdd[item].write_prot = state > 0 ? true : false;
break;
case SB_ZIP:
machine_status.zip[item].write_prot = state > 0 ? true : false;
break;
case SB_MO:
machine_status.mo[item].write_prot = state > 0 ? true : false;
break;
}
if (main_window != nullptr)
main_window->updateStatusEmptyIcons();
}
void
ui_sb_update_icon_state(int tag, int state)
{