Format code
This commit is contained in:
parent
7bdc489259
commit
23d4723a31
@ -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();
|
||||
};
|
||||
});
|
||||
|
@ -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 {
|
||||
|
@ -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();
|
||||
|
@ -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(_) => {
|
||||
|
Loading…
Reference in New Issue
Block a user