From a5aae09eb7cbb3b2d24b9bc02cf2ca39f3ebd676 Mon Sep 17 00:00:00 2001 From: OBattler Date: Thu, 22 Mar 2018 23:37:36 +0100 Subject: [PATCH] Fixed a minor issue in the S3 ViRGE emulation caused by me when porting the latest PCem commits. --- src/video/vid_s3_virge.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/video/vid_s3_virge.c b/src/video/vid_s3_virge.c index 462fa5146..bb104c921 100644 --- a/src/video/vid_s3_virge.c +++ b/src/video/vid_s3_virge.c @@ -8,7 +8,7 @@ * * S3 ViRGE emulation. * - * Version: @(#)vid_s3_virge.c 1.0.7 2018/03/22 + * Version: @(#)vid_s3_virge.c 1.0.8 2018/03/22 * * Authors: Sarah Walker, * Miran Grca, @@ -3097,7 +3097,7 @@ static void tri(virge_t *virge, s3d_t *s3d_tri, s3d_state_t *state, int yc, int3 RGB15_TO_24(src_col, src_r, src_g, src_b); break; case 2: /*24 bpp*/ - src_col = (*(uint32_t *)&vram[dest_addr & 0x3fffff]) & 0xffffff; + src_col = (*(uint32_t *)&vram[dest_addr & svga->vram_mask]) & 0xffffff; RGB24_TO_24(src_col, src_r, src_g, src_b); break; }