From b6cebc4edf71e9a1c5cc7dbe7b866a1eb74836c1 Mon Sep 17 00:00:00 2001 From: Philip Linde Date: Thu, 31 May 2018 19:43:33 +0000 Subject: [PATCH] Fix attribute clash quantization in update It would previously undershoot, not quantizing to an area fully enclosing the unquantized area. This solves issue #79 --- src/graph.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/graph.c b/src/graph.c index ecfa5a23..2b5fcc77 100644 --- a/src/graph.c +++ b/src/graph.c @@ -139,10 +139,10 @@ void Update_part_of_screen(short x, short y, short width, short height) // Round up to a multiple of 8 pixels, because some special modes (ZX, Thomson, ...) can change // more pixels than expected (attribute clash) + width = ((width + (x & 7)) | 7) + 1; + height = ((height + (y & 7)) | 7) + 1; x &= 0xFFF8; y &= 0xFFF8; - width = ((width - 1) | 0x7) + 1; - height = ((height - 1) | 0x7) + 1; // Update "normal" view diff = x-Main.offset_X;