From 1b7cd843e1f477dcc49f9e8e686a85c629fa821b Mon Sep 17 00:00:00 2001 From: Brandon Wright Date: Sat, 14 Sep 2019 19:59:09 -0500 Subject: [PATCH] libretro: Use burst phase with NTSC blitter. --- libretro/libretro.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/libretro/libretro.cpp b/libretro/libretro.cpp index ab318c27..47d37309 100644 --- a/libretro/libretro.cpp +++ b/libretro/libretro.cpp @@ -1736,6 +1736,7 @@ bool retro_unserialize(const void* data, size_t size) bool8 S9xDeinitUpdate(int width, int height) { + static int burst_phase = 0; int overscan_offset = 0; if (crop_overscan_mode == OVERSCAN_CROP_ON) @@ -1776,10 +1777,12 @@ bool8 S9xDeinitUpdate(int width, int height) if (blargg_filter) { - if(width == 512) - snes_ntsc_blit_hires(snes_ntsc, GFX.Screen, GFX.Pitch/2, 0, width, height, snes_ntsc_buffer, GFX.Pitch); + burst_phase = (burst_phase + 1) % 3; + + if (width == 512) + snes_ntsc_blit_hires(snes_ntsc, GFX.Screen, GFX.Pitch / 2, burst_phase, width, height, snes_ntsc_buffer, GFX.Pitch); else - snes_ntsc_blit(snes_ntsc, GFX.Screen, GFX.Pitch/2, 0, width, height, snes_ntsc_buffer, GFX.Pitch); + snes_ntsc_blit(snes_ntsc, GFX.Screen, GFX.Pitch / 2, burst_phase, width, height, snes_ntsc_buffer, GFX.Pitch); video_cb(snes_ntsc_buffer + ((int)(GFX.Pitch >> 1) * overscan_offset), SNES_NTSC_OUT_WIDTH(width), height, GFX.Pitch); }