From d507b8b6339cce45c3fcecaf05e15ff724ed0d4c Mon Sep 17 00:00:00 2001 From: EkeEke Date: Wed, 6 Nov 2013 01:13:38 +0100 Subject: [PATCH] [Core/VDP] fixed Game Gear display rendering regression when left/right borders are disabled --- core/vdp_render.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/core/vdp_render.c b/core/vdp_render.c index c6a9072..9496e51 100644 --- a/core/vdp_render.c +++ b/core/vdp_render.c @@ -4122,8 +4122,11 @@ void render_line(int line) } /* Horizontal borders */ - memset(&linebuf[0][0x20 - bitmap.viewport.x], 0x40, bitmap.viewport.x); - memset(&linebuf[0][0x20 + bitmap.viewport.w], 0x40, bitmap.viewport.x); + if (bitmap.viewport.x > 0) + { + memset(&linebuf[0][0x20 - bitmap.viewport.x], 0x40, bitmap.viewport.x); + memset(&linebuf[0][0x20 + bitmap.viewport.w], 0x40, bitmap.viewport.x); + } } else {