Skip to content
Snippets Groups Projects
Verified Commit 26950119 authored by João Magalhães's avatar João Magalhães :rocket:
Browse files

fix: clippy fix

parent 1504e701
No related branches found
No related tags found
No related merge requests found
Pipeline #2823 passed
...@@ -269,7 +269,7 @@ impl Apu { ...@@ -269,7 +269,7 @@ impl Apu {
return; return;
} }
self.sequencer += cycles as u16; self.sequencer += cycles;
if self.sequencer >= 8192 { if self.sequencer >= 8192 {
// each of these steps runs at 512/8 Hz = 64Hz, // each of these steps runs at 512/8 Hz = 64Hz,
// meaning a complete loop runs at 512 Hz // meaning a complete loop runs at 512 Hz
......
...@@ -598,7 +598,7 @@ impl Ppu { ...@@ -598,7 +598,7 @@ impl Ppu {
// increments the current mode clock by the provided amount // increments the current mode clock by the provided amount
// of CPU cycles (probably coming from a previous CPU clock) // of CPU cycles (probably coming from a previous CPU clock)
self.mode_clock += cycles as u16; self.mode_clock += cycles;
match self.mode { match self.mode {
PpuMode::OamRead => { PpuMode::OamRead => {
......
...@@ -40,14 +40,14 @@ impl Timer { ...@@ -40,14 +40,14 @@ impl Timer {
} }
pub fn clock(&mut self, cycles: u16) { pub fn clock(&mut self, cycles: u16) {
self.div_clock += cycles as u16; self.div_clock += cycles;
while self.div_clock >= 256 { while self.div_clock >= 256 {
self.div = self.div.wrapping_add(1); self.div = self.div.wrapping_add(1);
self.div_clock -= 256; self.div_clock -= 256;
} }
if self.tima_enabled { if self.tima_enabled {
self.tima_clock += cycles as u16; self.tima_clock += cycles;
while self.tima_clock >= self.tima_ratio { while self.tima_clock >= self.tima_ratio {
// in case TIMA value overflows must set the // in case TIMA value overflows must set the
// interrupt and update the TIMA value to // interrupt and update the TIMA value to
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment