Fixed S3 and ViRGE hardware cursor clipping, fixes #1733.
This commit is contained in:
@@ -1846,11 +1846,11 @@ s3_hwcursor_draw(svga_t *svga, int displine)
|
|||||||
if (svga->crtc[0x55] & 0x10) {
|
if (svga->crtc[0x55] & 0x10) {
|
||||||
/*X11*/
|
/*X11*/
|
||||||
for (xx = 0; xx < 16; xx++) {
|
for (xx = 0; xx < 16; xx++) {
|
||||||
if (offset >= svga->hwcursor_latch.x) {
|
if (offset >= 0) {
|
||||||
if (dat[0] & 0x8000)
|
if (dat[0] & 0x8000)
|
||||||
buffer32->line[displine][offset + svga->x_add] = (dat[1] & 0x8000) ? fg : bg;
|
buffer32->line[displine][offset + svga->x_add] = (dat[1] & 0x8000) ? fg : bg;
|
||||||
}
|
}
|
||||||
|
|
||||||
offset++;
|
offset++;
|
||||||
dat[0] <<= shift;
|
dat[0] <<= shift;
|
||||||
dat[1] <<= shift;
|
dat[1] <<= shift;
|
||||||
@@ -1858,16 +1858,16 @@ s3_hwcursor_draw(svga_t *svga, int displine)
|
|||||||
} else {
|
} else {
|
||||||
/*Windows*/
|
/*Windows*/
|
||||||
for (xx = 0; xx < width; xx++) {
|
for (xx = 0; xx < width; xx++) {
|
||||||
if (offset >= svga->hwcursor_latch.x) {
|
if (offset >= 0) {
|
||||||
if (!(dat[0] & 0x8000))
|
if (!(dat[0] & 0x8000))
|
||||||
buffer32->line[displine][offset + svga->x_add] = (dat[1] & 0x8000) ? fg : bg;
|
buffer32->line[displine][offset + svga->x_add] = (dat[1] & 0x8000) ? fg : bg;
|
||||||
else if (dat[1] & 0x8000)
|
else if (dat[1] & 0x8000)
|
||||||
buffer32->line[displine][offset + svga->x_add] ^= 0xffffff;
|
buffer32->line[displine][offset + svga->x_add] ^= 0xffffff;
|
||||||
}
|
}
|
||||||
|
|
||||||
offset++;
|
offset++;
|
||||||
dat[0] <<= shift;
|
dat[0] <<= shift;
|
||||||
dat[1] <<= shift;
|
dat[1] <<= shift;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
svga->hwcursor_latch.addr += 4;
|
svga->hwcursor_latch.addr += 4;
|
||||||
|
@@ -3316,7 +3316,7 @@ static void s3_virge_hwcursor_draw(svga_t *svga, int displine)
|
|||||||
/*X11*/
|
/*X11*/
|
||||||
for (xx = 0; xx < 16; xx++)
|
for (xx = 0; xx < 16; xx++)
|
||||||
{
|
{
|
||||||
if (offset >= svga->hwcursor_latch.x)
|
if (offset >= 0)
|
||||||
{
|
{
|
||||||
if (dat[0] & 0x8000)
|
if (dat[0] & 0x8000)
|
||||||
buffer32->line[displine][offset + svga->x_add] = (dat[1] & 0x8000) ? fg : bg;
|
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*/
|
/*Windows*/
|
||||||
for (xx = 0; xx < 16; xx++)
|
for (xx = 0; xx < 16; xx++)
|
||||||
{
|
{
|
||||||
if (offset >= svga->hwcursor_latch.x)
|
if (offset >= 0)
|
||||||
{
|
{
|
||||||
if (!(dat[0] & 0x8000))
|
if (!(dat[0] & 0x8000))
|
||||||
buffer32->line[displine][offset + svga->x_add] = (dat[1] & 0x8000) ? fg : bg;
|
buffer32->line[displine][offset + svga->x_add] = (dat[1] & 0x8000) ? fg : bg;
|
||||||
|
Reference in New Issue
Block a user