From d37b72e251a00c006fe60307ff2ae2d699a9562e Mon Sep 17 00:00:00 2001 From: Cacodemon345 Date: Fri, 16 Feb 2024 01:24:35 +0600 Subject: [PATCH] vid_tvp3026_ramdac: Implement warp-around for hardware cursor buffer32 drawing Fixes crashes on Windows 2000 --- src/video/vid_tvp3026_ramdac.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/video/vid_tvp3026_ramdac.c b/src/video/vid_tvp3026_ramdac.c index 4b63892de..625adfe41 100644 --- a/src/video/vid_tvp3026_ramdac.c +++ b/src/video/vid_tvp3026_ramdac.c @@ -649,7 +649,7 @@ tvp3026_hwcursor_draw(svga_t *svga, int displine) comb = (b0 | (b1 << 1)); y_pos = displine; - x_pos = offset + svga->x_add; + x_pos = (offset + svga->x_add) & 2047; p = svga->monitor->target_buffer->line[y_pos]; if (offset >= svga->dac_hwcursor_latch.x) {