From 619fe7bdaf80e01f3261f28eae7a333366e8f2c0 Mon Sep 17 00:00:00 2001 From: Alug Date: Fri, 5 Jan 2024 01:23:05 +0100 Subject: [PATCH] fix menu fade screen background using wrong things in palshader --- src/hardware/hw_draw.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/hardware/hw_draw.c b/src/hardware/hw_draw.c index 5aa2ae312..99c90243e 100644 --- a/src/hardware/hw_draw.c +++ b/src/hardware/hw_draw.c @@ -567,9 +567,14 @@ void HWR_FadeScreenMenuBack(UINT16 color, UINT8 strength) } else // Do TRANSMAP** fade. { - Surf.PolyColor.rgba = pLocalPalette[color].rgba; + if (HWR_ShouldUsePaletteRendering()) + Surf.PolyColor.rgba = pLocalPalette[color&0xFF].rgba; + else + Surf.PolyColor.rgba = pLocalPalette[color].rgba; + Surf.PolyColor.s.alpha = (UINT8)(strength*25.5f); } + HWD.pfnDrawPolygon(&Surf, v, 4, PF_NoTexture|PF_Modulated|PF_Translucent|PF_NoDepthTest, false); }