From af8765cb3bc5dbb27e7fb3059784d90332dcc727 Mon Sep 17 00:00:00 2001 From: pstef <3462925+pstef@users.noreply.github.com> Date: Sun, 6 Apr 2025 01:04:06 +0000 Subject: [PATCH] Fix DCFlushRange size calculation by correcting the operator precedence --- gfx/drivers/gx_gfx.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gfx/drivers/gx_gfx.c b/gfx/drivers/gx_gfx.c index da7fce023e..0e27b6f955 100644 --- a/gfx/drivers/gx_gfx.c +++ b/gfx/drivers/gx_gfx.c @@ -742,8 +742,8 @@ static void init_vtx(gx_video_t *gx, const video_info_t *video, } } - DCFlushRange(g_tex.data, ((g_tex.width * - g_tex.height) * video->rgb32) ? 4 : 2); + DCFlushRange(g_tex.data, g_tex.width * g_tex.height * + (video->rgb32 ? 4 : 2)); gx->rgb32 = video->rgb32; gx->scale = video->input_scale;