fix(ppu): DMA takes priority over OAM Scan
This commit is contained in:
parent
0c22509d24
commit
daeb02f7c9
|
@ -192,7 +192,8 @@ impl Ppu {
|
||||||
}
|
}
|
||||||
|
|
||||||
fn scan_oam(&mut self) {
|
fn scan_oam(&mut self) {
|
||||||
if self.scan_state.mode() == OamScanMode::Scan {
|
match self.scan_state.mode() {
|
||||||
|
OamScanMode::Scan if !self.dma.is_active() => {
|
||||||
if !self.window_stat.coincidence() && self.scan_state.count() == 0 {
|
if !self.window_stat.coincidence() && self.scan_state.count() == 0 {
|
||||||
// Determine whether we should draw the window next frame
|
// Determine whether we should draw the window next frame
|
||||||
self.window_stat
|
self.window_stat
|
||||||
|
@ -215,6 +216,8 @@ impl Ppu {
|
||||||
|
|
||||||
self.scan_state.increase();
|
self.scan_state.increase();
|
||||||
}
|
}
|
||||||
|
_ => {}
|
||||||
|
}
|
||||||
|
|
||||||
self.scan_state.next();
|
self.scan_state.next();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue