Fix A/D switches not making click sounds

This commit is contained in:
pjht 2024-02-01 19:15:41 -06:00
parent 63de2cf5ae
commit b95c770acb
Signed by: pjht
GPG Key ID: 7B5F6AFBEC7EE78E
2 changed files with 3 additions and 0 deletions

View File

@ -27,6 +27,7 @@ pub enum ActionSwitch {
#[derive(Clone, Copy, Debug)]
pub enum FrontpanelInteraction {
ActionSw(ActionSwitch, SwitchState),
AddrData(u16),
Power(bool),
}
@ -163,6 +164,7 @@ impl Widget for &mut Frontpanel<'_> {
{
self.state.ad_sws =
(self.state.ad_sws & !(bit_mask)) | (u16::from(sw_state) << (16 - i));
self.interaction = Some(FrontpanelInteraction::AddrData(self.state.ad_sws()));
resp.mark_changed();
};
});

View File

@ -95,6 +95,7 @@ impl EmuState {
self.audio_tx.send(AudioMessage::FanOff).unwrap();
}
}
FrontpanelInteraction::AddrData(_) => (),
}
self.update_fp();
}