From 236231ded1580cc523b6c5211ecab4658b297e80 Mon Sep 17 00:00:00 2001 From: Agent X <44549182+Agent-11@users.noreply.github.com> Date: Thu, 4 Jan 2024 15:10:32 -0500 Subject: [PATCH] Fix djui_hud_get_color() --- src/pc/djui/djui_hud_utils.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/pc/djui/djui_hud_utils.c b/src/pc/djui/djui_hud_utils.c index d88e2659e..05aea41e6 100644 --- a/src/pc/djui/djui_hud_utils.c +++ b/src/pc/djui/djui_hud_utils.c @@ -29,6 +29,7 @@ static enum HudUtilsFilter sFilter = FILTER_NEAREST; static enum DjuiFontType sFont = FONT_NORMAL; static struct HudUtilsRotation sRotation = { 0, 0, 0 }; static struct DjuiColor sColor = { 255, 255, 255, 255 }; +static struct DjuiColor sRefColor = { 255, 255, 255, 255 }; f32 gDjuiHudUtilsZ = 0; u8 gDjuiHudLockMouse = false; @@ -173,7 +174,11 @@ void djui_hud_set_font(enum DjuiFontType fontType) { } struct DjuiColor* djui_hud_get_color(void) { - return &sColor; + sRefColor.r = sColor.r; + sRefColor.g = sColor.g; + sRefColor.b = sColor.b; + sRefColor.a = sColor.a; + return &sRefColor; } void djui_hud_set_color(u8 r, u8 g, u8 b, u8 a) {