diff --git a/src/video/vid_s3.c b/src/video/vid_s3.c index a5e635a99..775f8b39d 100644 --- a/src/video/vid_s3.c +++ b/src/video/vid_s3.c @@ -1846,11 +1846,11 @@ s3_hwcursor_draw(svga_t *svga, int displine) if (svga->crtc[0x55] & 0x10) { /*X11*/ for (xx = 0; xx < 16; xx++) { - if (offset >= svga->hwcursor_latch.x) { + if (offset >= 0) { if (dat[0] & 0x8000) buffer32->line[displine][offset + svga->x_add] = (dat[1] & 0x8000) ? fg : bg; } - + offset++; dat[0] <<= shift; dat[1] <<= shift; @@ -1858,16 +1858,16 @@ s3_hwcursor_draw(svga_t *svga, int displine) } else { /*Windows*/ for (xx = 0; xx < width; xx++) { - if (offset >= svga->hwcursor_latch.x) { + if (offset >= 0) { if (!(dat[0] & 0x8000)) buffer32->line[displine][offset + svga->x_add] = (dat[1] & 0x8000) ? fg : bg; else if (dat[1] & 0x8000) buffer32->line[displine][offset + svga->x_add] ^= 0xffffff; - } - - offset++; - dat[0] <<= shift; - dat[1] <<= shift; + } + + offset++; + dat[0] <<= shift; + dat[1] <<= shift; } } svga->hwcursor_latch.addr += 4; diff --git a/src/video/vid_s3_virge.c b/src/video/vid_s3_virge.c index eaaa55ebd..db12879ec 100644 --- a/src/video/vid_s3_virge.c +++ b/src/video/vid_s3_virge.c @@ -3316,7 +3316,7 @@ static void s3_virge_hwcursor_draw(svga_t *svga, int displine) /*X11*/ for (xx = 0; xx < 16; xx++) { - if (offset >= svga->hwcursor_latch.x) + if (offset >= 0) { if (dat[0] & 0x8000) buffer32->line[displine][offset + svga->x_add] = (dat[1] & 0x8000) ? fg : bg; @@ -3332,7 +3332,7 @@ static void s3_virge_hwcursor_draw(svga_t *svga, int displine) /*Windows*/ for (xx = 0; xx < 16; xx++) { - if (offset >= svga->hwcursor_latch.x) + if (offset >= 0) { if (!(dat[0] & 0x8000)) buffer32->line[displine][offset + svga->x_add] = (dat[1] & 0x8000) ? fg : bg;