From cf2670329263d9e6108f7538d30d0a011464e30e Mon Sep 17 00:00:00 2001 From: ds22x <45218067+ds22x@users.noreply.github.com> Date: Sun, 6 Feb 2022 09:03:37 +0100 Subject: [PATCH] [libretro] Fix the 'Hiding Master System Side Borders' option not working with 'Blargg NTSC filter' (#411) --- libretro/libretro.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/libretro/libretro.c b/libretro/libretro.c index d7fb5754..e7e919aa 100644 --- a/libretro/libretro.c +++ b/libretro/libretro.c @@ -3529,20 +3529,20 @@ void retro_run(void) if ((config.left_border != 0) && (reg[0] & 0x20) && (bitmap.viewport.x == 0) && ((system_hw == SYSTEM_MARKIII) || (system_hw & SYSTEM_SMS) || (system_hw == SYSTEM_PBC))) { - bmdoffset = 16; - if (config.left_border == 1) - vwoffset = 8; - else - vwoffset = 16; + bmdoffset = (16 + (config.ntsc ? 24 : 0)); + if (config.left_border == 1) + vwoffset = (8 + (config.ntsc ? 12 : 0)); + else + vwoffset = (16 + (config.ntsc ? 24 : 0)); } if (!do_skip) { - video_cb(bitmap.data + bmdoffset, vwidth - vwoffset, vheight, 720 * 2); - } + video_cb(bitmap.data + bmdoffset, vwidth - vwoffset, vheight, 720 * 2); + } else { - video_cb(NULL, vwidth - vwoffset, vheight, 720 * 2); + video_cb(NULL, vwidth - vwoffset, vheight, 720 * 2); } audio_cb(soundbuffer, audio_update(soundbuffer));