Fixed hardware cursor drawing when EGA/(S)VGA overscan is enabled for every graphics card that supports hardware cursor acceleration.

This commit is contained in:
OBattler
2018-07-16 01:43:12 +02:00
parent 950ce8f5aa
commit 16b024c24f
6 changed files with 32 additions and 19 deletions

View File

@@ -8,7 +8,7 @@
*
* ATi Mach64 graphics card emulation.
*
* Version: @(#)vid_ati_mach64.c 1.0.21 2018/04/29
* Version: @(#)vid_ati_mach64.c 1.0.22 2018/07/16
*
* Authors: Sarah Walker, <http://pcem-emulator.co.uk/>
* Miran Grca, <mgrca8@gmail.com>
@@ -2780,8 +2780,10 @@ void mach64_hwcursor_draw(svga_t *svga, int displine)
uint8_t dat;
uint32_t col0 = mach64->ramdac.pallook[0];
uint32_t col1 = mach64->ramdac.pallook[1];
int y_add = (enable_overscan && !suppress_overscan) ? 16 : 0;
int x_add = (enable_overscan && !suppress_overscan) ? 8 : 0;
int y_add, x_add;
y_add = (enable_overscan && !suppress_overscan) ? (overscan_y >> 1) : 0;
x_add = (enable_overscan && !suppress_overscan) ? 8 : 0;
offset = svga->hwcursor_latch.xoff;
for (x = 0; x < 64 - svga->hwcursor_latch.xoff; x += 4)