Format code
This commit is contained in:
parent
7bdc489259
commit
23d4723a31
@ -162,9 +162,10 @@ impl Widget for &mut Frontpanel<'_> {
|
|||||||
))
|
))
|
||||||
.changed()
|
.changed()
|
||||||
{
|
{
|
||||||
self.state.ad_sws =
|
self.state.ad_sws = (self.state.ad_sws & !(bit_mask))
|
||||||
(self.state.ad_sws & !(bit_mask)) | (u16::from(sw_state) << (16 - i));
|
| (u16::from(sw_state) << (16 - i));
|
||||||
self.interaction = Some(FrontpanelInteraction::AddrData(self.state.ad_sws()));
|
self.interaction =
|
||||||
|
Some(FrontpanelInteraction::AddrData(self.state.ad_sws()));
|
||||||
resp.mark_changed();
|
resp.mark_changed();
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
@ -14,11 +14,7 @@ pub struct Textures {
|
|||||||
|
|
||||||
impl Textures {
|
impl Textures {
|
||||||
pub fn new(up: TextureHandle, neut: TextureHandle, down: TextureHandle) -> Self {
|
pub fn new(up: TextureHandle, neut: TextureHandle, down: TextureHandle) -> Self {
|
||||||
Self {
|
Self { up, neut, down }
|
||||||
up,
|
|
||||||
neut,
|
|
||||||
down,
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn get_for_state(&self, state: SwitchState) -> TextureId {
|
pub fn get_for_state(&self, state: SwitchState) -> TextureId {
|
||||||
|
@ -88,7 +88,13 @@ impl AltairEmulator {
|
|||||||
);
|
);
|
||||||
ui.close_menu();
|
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
|
self.windows
|
||||||
.insert("load_bin", Box::new(LoadBinWindow::new(ui.ctx())));
|
.insert("load_bin", Box::new(LoadBinWindow::new(ui.ctx())));
|
||||||
ui.close_menu();
|
ui.close_menu();
|
||||||
|
@ -114,7 +114,10 @@ impl EmuState {
|
|||||||
MemCycle::Fetch(a) | MemCycle::Read(a) | MemCycle::StackRead(a) => {
|
MemCycle::Fetch(a) | MemCycle::Read(a) | MemCycle::StackRead(a) => {
|
||||||
self.fp_state.set_data(self.mem[a as usize]);
|
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);
|
self.fp_state.set_data(0xff);
|
||||||
}
|
}
|
||||||
MemCycle::In(_) => {
|
MemCycle::In(_) => {
|
||||||
|
Loading…
Reference in New Issue
Block a user