From 16b20883039eb9cc4565ddd8c48f38131a73dfe6 Mon Sep 17 00:00:00 2001 From: Toni Wilen Date: Tue, 7 Apr 2026 17:47:06 +0300 Subject: [PATCH] Added missing filtered low resolution support to generic drawing routine --- drawing.cpp | 43 ++++++++++++++++++++++++++++++++----------- 1 file changed, 32 insertions(+), 11 deletions(-) diff --git a/drawing.cpp b/drawing.cpp index 152ea940..e28c5b1a 100644 --- a/drawing.cpp +++ b/drawing.cpp @@ -6669,22 +6669,43 @@ static void lts_unaligned_aga(int cnt, int cnt_next, int h) dtgbuf[h][ipix] = gpix; // bitplane and sprite merge & output - if (!dpixcnt && buf1 && denise_pixtotal >= 0 && denise_pixtotal < denise_pixtotal_max) { - - uae_u32 t = dtbuf[h ^ lol][ipix]; + int dpixcnt_add = hresolution_add << xshift; + if (buf1 && denise_pixtotal >= 0 && denise_pixtotal < denise_pixtotal_max) { + + if (currprefs.gfx_lores_mode && dpixcnt_add == 2) { + if (ipix == 1 || ipix == 3) { + uae_u32 t0 = dtbuf[h ^ lol][ipix]; + uae_u32 t1 = dtbuf[h ^ lol][ipix - 1]; + uae_u32 t = filter_pixel(t0, t1); #ifdef DEBUGGER - if (decode_specials_debug) { - t = decode_denise_specials_debug(t, cnt); - } + if (decode_specials_debug) { + t = decode_denise_specials_debug(t, cnt); + } #endif - *buf1++ = t; - *buf2++ = t; - if (gbuf) { - *gbuf++ = dtgbuf[h ^ lol][ipix]; + *buf1++ = t; + *buf2++ = t; + if (gbuf) { + *gbuf++ = dtgbuf[h ^ lol][ipix]; + } + } + } else { + if (!dpixcnt) { + uae_u32 t = dtbuf[h ^ lol][ipix]; +#ifdef DEBUGGER + if (decode_specials_debug) { + t = decode_denise_specials_debug(t, cnt); + } +#endif + *buf1++ = t; + *buf2++ = t; + if (gbuf) { + *gbuf++ = dtgbuf[h ^ lol][ipix]; + } + } } } - dpixcnt += hresolution_add << xshift; + dpixcnt += dpixcnt_add; dpixcnt &= (1 << RES_SUPERHIRES) - 1; cnt += xadd; -- 2.47.3