Skip to content

Commit

Permalink
refactor: simplify
Browse files Browse the repository at this point in the history
  • Loading branch information
luckasRanarison committed Oct 8, 2024
1 parent 79b25ed commit 84f8451
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/apu/channels/dmc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,9 @@ impl OutputUnit {
}

fn shift(&mut self) {
match self.shift_register.contains(0) {
true if self.level < 126 => self.level += 2,
false if self.level > 2 => self.level -= 2,
match self.shift_register.get(0) {
1 if self.level < 126 => self.level += 2,
0 if self.level > 2 => self.level -= 2,
_ => {}
}

Expand Down

0 comments on commit 84f8451

Please sign in to comment.