diff options
Diffstat (limited to 'src/util')
| -rw-r--r-- | src/util/color_palette.c | 3 | ||||
| -rw-r--r-- | src/util/color_palette.h | 1 |
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]; }; |