From e0de4c7f87e127fbc5288a95a350849d95265841 Mon Sep 17 00:00:00 2001 From: AITUS95 <48457684+AITUS95@users.noreply.github.com> Date: Thu, 8 Jan 2026 23:48:37 +0100 Subject: [PATCH] Refactor dirty line calculation --- src/video/vid_voodoo_render.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/video/vid_voodoo_render.c b/src/video/vid_voodoo_render.c index b25f42507..19dedfa7a 100644 --- a/src/video/vid_voodoo_render.c +++ b/src/video/vid_voodoo_render.c @@ -1389,8 +1389,11 @@ skip_pixel: voodoo->texel_count[odd_even] += state->texel_count; voodoo->fbiPixelsIn += state->pixel_count; - if (voodoo->params.draw_offset == voodoo->params.front_offset && (real_y >> 1) < 2048) - voodoo->dirty_line[real_y >> 1] = 1; + if (voodoo->params.draw_offset == voodoo->params.front_offset) { + int dirty_idx = SLI_ENABLED ? (real_y >> 1) : real_y; + if (dirty_idx < 2048) + voodoo->dirty_line[dirty_idx] = 1; + } next_line: if (SLI_ENABLED) {