Format code

This commit is contained in:
pjht 2024-02-02 13:42:41 -06:00
parent 7bdc489259
commit 23d4723a31
Signed by: pjht
GPG Key ID: 7B5F6AFBEC7EE78E
4 changed files with 16 additions and 10 deletions

View File

@ -162,9 +162,10 @@ impl Widget for &mut Frontpanel<'_> {
))
.changed()
{
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()));
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

@ -14,11 +14,7 @@ pub struct Textures {
impl Textures {
pub fn new(up: TextureHandle, neut: TextureHandle, down: TextureHandle) -> Self {
Self {
up,
neut,
down,
}
Self { up, neut, down }
}
pub fn get_for_state(&self, state: SwitchState) -> TextureId {

View File

@ -88,7 +88,13 @@ impl AltairEmulator {
);
ui.close_menu();
}
if ui.add_enabled(!self.windows.contains_key("load_bin"), Button::new("Load binary file")).clicked() {
if ui
.add_enabled(
!self.windows.contains_key("load_bin"),
Button::new("Load binary file"),
)
.clicked()
{
self.windows
.insert("load_bin", Box::new(LoadBinWindow::new(ui.ctx())));
ui.close_menu();

View File

@ -114,7 +114,10 @@ impl EmuState {
MemCycle::Fetch(a) | MemCycle::Read(a) | MemCycle::StackRead(a) => {
self.fp_state.set_data(self.mem[a as usize]);
}
MemCycle::Write(_, _) | MemCycle::StackWrite(_, _) | MemCycle::Out(_, _) | MemCycle::Hlta => {
MemCycle::Write(_, _)
| MemCycle::StackWrite(_, _)
| MemCycle::Out(_, _)
| MemCycle::Hlta => {
self.fp_state.set_data(0xff);
}
MemCycle::In(_) => {