summaryrefslogtreecommitdiff
path: root/src/util
diff options
context:
space:
mode:
authorAndrew Opalach <andrew@akon.city> 2026-09-07 15:06:14 -0400
committerAndrew Opalach <andrew@akon.city> 2026-09-07 15:06:14 -0400
commitc66c7c64ebd16287b892f8a780cffcabafba3799 (patch)
treeb2195902ef055147878b591cf1171be7e6133c97 /src/util
parent1758ae9e860bd3b65b661e3c804288c3599f4fd4 (diff)
downloadcamu-c66c7c64ebd16287b892f8a780cffcabafba3799.tar.gz
camu-c66c7c64ebd16287b892f8a780cffcabafba3799.tar.bz2
camu-c66c7c64ebd16287b892f8a780cffcabafba3799.zip
Better OSD behavior, lots of build stuff
Signed-off-by: Andrew Opalach <andrew@akon.city>
Diffstat (limited to 'src/util')
-rw-r--r--src/util/color_palette.c3
-rw-r--r--src/util/color_palette.h1
2 files changed, 4 insertions, 0 deletions
diff --git a/src/util/color_palette.c b/src/util/color_palette.c
index f12d1f8..ca14c55 100644
--- a/src/util/color_palette.c
+++ b/src/util/color_palette.c
@@ -36,6 +36,7 @@ static char *normal_colors[16] = {
bool camu_colors_maybe_init(str *path)
{
+ al_memset(&global_color_palette, 0, sizeof(global_color_palette));
#ifdef NAUNET_HAS_JSON
struct nn_file file;
if (!nn_file_exists(path) || !nn_file_open(&file, path, NNWT_FILE_READONLY)) {
@@ -110,6 +111,8 @@ bool camu_colors_maybe_init(str *path)
out:
json_decref(root);
+ global_color_palette.supplied = parsed;
+
return parsed;
#else
(void)path;
diff --git a/src/util/color_palette.h b/src/util/color_palette.h
index b0cc9f4..5943147 100644
--- a/src/util/color_palette.h
+++ b/src/util/color_palette.h
@@ -28,6 +28,7 @@ enum {
#define CAMU_COLOR_PALETTE_COUNT 18
struct camu_color_palette {
+ bool supplied;
u32 colors[CAMU_COLOR_PALETTE_COUNT];
};