EmuState::update_fp now properly handles powered off state
This commit is contained in:
parent
46119048c2
commit
b5727da45b
11
src/state.rs
11
src/state.rs
@ -99,16 +99,19 @@ impl EmuState {
|
||||
self.update_fp();
|
||||
} else {
|
||||
self.audio_tx.send(AudioMessage::FanOff).unwrap();
|
||||
self.running = false;
|
||||
self.fp_state.set_status(Status::empty());
|
||||
self.fp_state.set_addr(0);
|
||||
self.fp_state.set_data(0);
|
||||
self.update_fp();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
pub fn update_fp(&mut self) {
|
||||
if !self.fp_state.power() {
|
||||
self.fp_state.set_addr(0);
|
||||
self.fp_state.set_data(0);
|
||||
self.fp_state.set_status(Status::empty());
|
||||
return;
|
||||
}
|
||||
let cycle = self.cpu.get_mem_cycle();
|
||||
self.fp_state.set_status(cycle.get_status());
|
||||
match cycle {
|
||||
|
Loading…
Reference in New Issue
Block a user