From 11b29c7c18a33a80138bc777b67de9bf5227c073 Mon Sep 17 00:00:00 2001 From: SarahW Date: Wed, 12 Aug 2020 18:07:04 +0100 Subject: [PATCH] Fix Banshee host data size when source format is 1 bpp. Fixes some bad icon masks in Windows 98. --- src/vid_voodoo_banshee_blitter.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/vid_voodoo_banshee_blitter.c b/src/vid_voodoo_banshee_blitter.c index 6a3204d..41c1947 100644 --- a/src/vid_voodoo_banshee_blitter.c +++ b/src/vid_voodoo_banshee_blitter.c @@ -561,7 +561,12 @@ static void banshee_do_host_to_screen_blt(voodoo_t *voodoo, int count, uint32_t if ((voodoo->banshee_blt.srcFormat & SRC_FORMAT_PACKING_MASK) == SRC_FORMAT_PACKING_STRIDE) { - int last_byte = (voodoo->banshee_blt.srcX & 3) + voodoo->banshee_blt.host_data_size_dest; + int last_byte; + + if ((voodoo->banshee_blt.srcFormat & SRC_FORMAT_COL_MASK) == SRC_FORMAT_COL_1_BPP) + last_byte = (((voodoo->banshee_blt.srcX + 7) >> 3) & 3) + voodoo->banshee_blt.host_data_size_dest; + else + last_byte = (voodoo->banshee_blt.srcX & 3) + voodoo->banshee_blt.host_data_size_dest; *(uint32_t *)&voodoo->banshee_blt.host_data[voodoo->banshee_blt.host_data_count] = data; voodoo->banshee_blt.host_data_count += 4;