From f2a46d7700fdb0bedcf4ddb7efa524179cece498 Mon Sep 17 00:00:00 2001 From: OBattler Date: Sun, 18 Oct 2020 00:14:33 +0200 Subject: [PATCH] Fixed two very stupid mistakes in said cursor rewrite. --- src/video/vid_tgui9440.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/video/vid_tgui9440.c b/src/video/vid_tgui9440.c index b031ff92f..a9e87ac57 100644 --- a/src/video/vid_tgui9440.c +++ b/src/video/vid_tgui9440.c @@ -683,7 +683,7 @@ void tgui_hwcursor_draw(svga_t *svga, int displine) int offset = svga->hwcursor_latch.x + svga->hwcursor_latch.xoff; int pitch = (svga->hwcursor.xsize == 64) ? 16 : 8; int byte, bit; - int color; + uint32_t color; if (svga->interlace && svga->hwcursor_oddeven) svga->hwcursor_latch.addr += pitch; @@ -694,7 +694,7 @@ void tgui_hwcursor_draw(svga_t *svga, int displine) dat[0] = (svga->vram[byte] >> bit) & 0x01; /* AND */ dat[1] = (svga->vram[(pitch >> 1) + byte] >> bit) & 0x01; /* XOR */ val = (dat[0] << 1) || dat[1]; - color = svga->vram[svga->x_add + offset + xx]; + color = ((uint32_t *)buffer32->line[displine])[svga->x_add + offset + xx]; if (!!(svga->crtc[0x50] & 0x40)) { /* X11 style? */ switch (val) { @@ -724,7 +724,7 @@ void tgui_hwcursor_draw(svga_t *svga, int displine) break; } } - svga->vram[svga->x_add + offset + xx] = color; + ((uint32_t *)buffer32->line[displine])[svga->x_add + offset + xx] = color; } svga->hwcursor_latch.addr += pitch;