cpu.rs: Properly pause during multistep

This commit is contained in:
John 2023-08-31 22:41:24 -05:00
parent 7ab0a596c9
commit 39fe4411d6

View File

@ -431,6 +431,9 @@ impl CPU {
//let speed = 1.0 / steps as f64;
for _ in 0..steps {
self.tick(screen)?;
if self.flags.is_paused() {
break;
}
}
self.delay = self.delay.saturating_sub(1);
self.sound = self.sound.saturating_sub(1);