Skip to content

Commit

Permalink
Respect window enable flags if only one window is enabled
Browse files Browse the repository at this point in the history
  • Loading branch information
twvd committed Dec 29, 2023
1 parent f6694da commit 341e15d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/snes/ppu/render.rs
Original file line number Diff line number Diff line change
Expand Up @@ -496,8 +496,8 @@ impl PPUState {
let use_masking = w1area & w2area & WINAREA_ENABLE != 0;

for x in 0..=u8::MAX {
let in_w1 = in_window(w1area, &w1, x);
let in_w2 = in_window(w2area, &w2, x);
let in_w1 = (w1area & WINAREA_ENABLE) != 0 && in_window(w1area, &w1, x);
let in_w2 = (w2area & WINAREA_ENABLE) != 0 && in_window(w2area, &w2, x);

if !use_masking {
ret[x as usize] = in_w1 || in_w2;
Expand Down

0 comments on commit 341e15d

Please sign in to comment.