Skip to content

Commit

Permalink
Fix stupid bug
Browse files Browse the repository at this point in the history
  • Loading branch information
IsaacMarovitz committed Jan 31, 2024
1 parent c6b2cc8 commit 84a9a67
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/components/ppu.rs
Original file line number Diff line number Diff line change
Expand Up @@ -244,15 +244,14 @@ impl PPU {
}

fn check_lyc(&mut self) {
let mut lcds = self.lcds;
if self.ly == self.lc {
if lcds.contains(LCDS::LYC_SELECT) && !lcds.contains(LCDS::LYC_EQUALS) {
if self.lcds.contains(LCDS::LYC_SELECT) && !self.lcds.contains(LCDS::LYC_EQUALS) {
self.interrupts |= Interrupts::LCD;
}

lcds |= LCDS::LYC_EQUALS;
self.lcds |= LCDS::LYC_EQUALS;
} else {
lcds &= !LCDS::LYC_EQUALS;
self.lcds &= !LCDS::LYC_EQUALS;
}
}

Expand Down

0 comments on commit 84a9a67

Please sign in to comment.