Skip to content

Commit

Permalink
ppu: Do not double render height unless in interlacing mode
Browse files Browse the repository at this point in the history
  • Loading branch information
carmiker committed Aug 4, 2024
1 parent e285c58 commit df1ff72
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion bsnes/sfc/ppu/ppu.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ auto PPU::refresh() -> void {
auto output = this->output;
auto pitch = 512;
auto width = 512;
auto height = 480;
auto height = ppu.display.interlace ? 480 : 240;
if(configuration.video.blurEmulation) {
for(uint y : range(height)) {
auto data = output + y * pitch;
Expand Down
2 changes: 1 addition & 1 deletion bsnes/sfc/ppu/screen.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
auto PPU::Screen::scanline() -> void {
auto y = ppu.vcounter() + (!ppu.display.overscan ? 7 : 0);

lineA = ppu.output + y * 1024;
lineA = ppu.output + y * (ppu.display.interlace ? 1024 : 512);
lineB = lineA + (ppu.display.interlace ? 0 : 512);
if(ppu.display.interlace && ppu.field()) lineA += 512, lineB += 512;

Expand Down

0 comments on commit df1ff72

Please sign in to comment.