From 6ecf232edd296cdc22667fd58e45e14fefabbba7 Mon Sep 17 00:00:00 2001 From: Jonathan G Rennison Date: Wed, 9 Dec 2020 22:56:49 +0000 Subject: [PATCH] Fix rendering artefacts in colour news window viewports Off by one error in applying dimming recolour created doubly-dimmed lines on dirty block redrawing boundaries. --- src/gfx.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gfx.cpp b/src/gfx.cpp index 94327af16a..9d506b7dbd 100644 --- a/src/gfx.cpp +++ b/src/gfx.cpp @@ -1510,7 +1510,7 @@ static void DrawDirtyViewport(uint occlusion, int left, int top, int right, int extern void ViewportDrawChk(Viewport *vp, int left, int top, int right, int bottom); ViewportDrawChk(_dirty_viewport, left, top, right, bottom); if (_dirty_viewport_disp_flags & (ND_SHADE_GREY | ND_SHADE_DIMMED)) { - GfxFillRect(left, top, right, bottom, + GfxFillRect(left, top, right - 1, bottom - 1, (_dirty_viewport_disp_flags & ND_SHADE_DIMMED) ? PALETTE_TO_TRANSPARENT : PALETTE_NEWSPAPER, FILLRECT_RECOLOUR); } VideoDriver::GetInstance()->MakeDirty(left, top, right - left, bottom - top);