From 496cc2fa0bc87db4ef7f51405460c1cd0ea60fba Mon Sep 17 00:00:00 2001 From: toaster Date: Thu, 5 Jan 2023 20:21:46 +0000 Subject: [PATCH] CV_palette_OnChange: do not reload colour cube until LOADED_CONFIG is complete No substitute for an actual mutex on the palette, but this does at least prevent 21 redundant calls to palette reinitialisation --- src/v_video.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/v_video.c b/src/v_video.c index e633b4e3f..9f707ef1c 100644 --- a/src/v_video.c +++ b/src/v_video.c @@ -476,6 +476,8 @@ void V_SetPaletteLump(const char *pal) static void CV_palette_OnChange(void) { + if (con_startup_loadprogress < LOADED_CONFIG) + return; // recalculate Color Cube V_ReloadPalette(); V_SetPalette(0);