From 049579919eccb28b50d5b5826573fe72a263b3f9 Mon Sep 17 00:00:00 2001 From: OBattler Date: Mon, 24 Jun 2024 15:13:12 +0200 Subject: [PATCH] MGA: Fix textures in certain cases. --- src/video/vid_mga.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/video/vid_mga.c b/src/video/vid_mga.c index ada8b89cf..79d669bdc 100644 --- a/src/video/vid_mga.c +++ b/src/video/vid_mga.c @@ -5121,7 +5121,7 @@ texture_read(mystique_t *mystique, int *tex_r, int *tex_g, int *tex_b, int *atra s = ((int64_t) (int32_t) mystique->dwgreg.tmr[6] * q) >> s_shift; t = ((int64_t) (int32_t) mystique->dwgreg.tmr[7] * q) >> t_shift; s_frac = (((int64_t) (int32_t) mystique->dwgreg.tmr[6] * q) & ((1 << s_shift) - 1)) / (double)(1 << s_shift); - t_frac = (((int64_t) (int32_t) mystique->dwgreg.tmr[6] * q) & ((1 << t_shift) - 1)) / (double)(1 << t_shift); + t_frac = (((int64_t) (int32_t) mystique->dwgreg.tmr[7] * q) & ((1 << t_shift) - 1)) / (double)(1 << t_shift); } if (mystique->dwgreg.texctl & TEXCTL_CLAMPU) {