From de1cae40f757ce103583ac36b106672d209dcc9b Mon Sep 17 00:00:00 2001 From: OBattler Date: Sun, 7 Jun 2020 21:32:10 +0200 Subject: [PATCH] The EGA and (S)VGA renders no longer draw a line's left and right overscan borders if the line is < 0. --- src/video/vid_ega_render.c | 6 ++++++ src/video/vid_svga_render.c | 6 ++++++ 2 files changed, 12 insertions(+) diff --git a/src/video/vid_ega_render.c b/src/video/vid_ega_render.c index 5e6337a48..0ab9b5b3f 100644 --- a/src/video/vid_ega_render.c +++ b/src/video/vid_ega_render.c @@ -76,6 +76,9 @@ ega_render_overscan_left(ega_t *ega) { int i; + if ((ega->displine + ega->y_add) < 0) + return; + if (ega->scrblank || (ega->hdisp == 0)) return; @@ -89,6 +92,9 @@ ega_render_overscan_right(ega_t *ega) { int i, right; + if ((ega->displine + ega->y_add) < 0) + return; + if (ega->scrblank || (ega->hdisp == 0)) return; diff --git a/src/video/vid_svga_render.c b/src/video/vid_svga_render.c index 30b274067..c76bf2d72 100644 --- a/src/video/vid_svga_render.c +++ b/src/video/vid_svga_render.c @@ -69,6 +69,9 @@ svga_render_overscan_left(svga_t *svga) { int i; + if ((svga->displine + svga->y_add) < 0) + return; + if (svga->scrblank || (svga->hdisp == 0)) return; @@ -82,6 +85,9 @@ svga_render_overscan_right(svga_t *svga) { int i, right; + if ((svga->displine + svga->y_add) < 0) + return; + if (svga->scrblank || (svga->hdisp == 0)) return;