dont let the game know about the speedup
This commit is contained in:
parent
f87fe618fd
commit
f759fdd48c
|
@ -64,7 +64,7 @@ impl CPU {
|
|||
}
|
||||
|
||||
fn increment_timers(&mut self, cycles: u8) {
|
||||
let secs = (cycles * 4) as f64 / (CLOCK_SPEED * SPEEDUP);
|
||||
let secs = (cycles * 4) as f64 / CLOCK_SPEED;
|
||||
|
||||
self.vblank_timer += secs;
|
||||
if self.vblank_remaining > 0 {
|
||||
|
@ -94,7 +94,7 @@ impl CPU {
|
|||
self.memory.set(0xFF05, val);
|
||||
}
|
||||
}
|
||||
spin_sleep::sleep(Duration::from_secs_f64(secs));
|
||||
spin_sleep::sleep(Duration::from_secs_f64(secs / SPEEDUP));
|
||||
}
|
||||
|
||||
fn next_opcode(&mut self) -> u8 {
|
||||
|
|
Loading…
Reference in a new issue