From cd6eb65fc58dcaecc152fb9436e0625888969034 Mon Sep 17 00:00:00 2001 From: Aaron Culliney Date: Sun, 26 Nov 2017 13:35:33 -0800 Subject: [PATCH] Ensure color preferences set before any messaging on startup --- src/video/glalert.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/video/glalert.c b/src/video/glalert.c index 01989ebc..fdd0c0a9 100644 --- a/src/video/glalert.c +++ b/src/video/glalert.c @@ -389,13 +389,15 @@ static void alert_applyPrefs(void) { long height = prefs_parseLongValue (PREF_DOMAIN_INTERFACE, PREF_DEVICE_HEIGHT, &lVal, 10) ? lVal : (long)(SCANHEIGHT*1.5); bool isLandscape = prefs_parseBoolValue (PREF_DOMAIN_INTERFACE, PREF_DEVICE_LANDSCAPE, &bVal) ? bVal : true; - glhud_currentColorScheme = prefs_parseLongValue(PREF_DOMAIN_INTERFACE, PREF_SOFTHUD_COLOR, &lVal, 10) ? (interface_colorscheme_t)lVal : RED_ON_BLACK; - alert_reshape((int)width, (int)height, isLandscape); } static void alert_prefsChanged(const char *domain) { prefsChanged = true; + + // HACK NOTE : on startup, ensure that we have the correct color scheme before drawing anything + long lVal = 0; + glhud_currentColorScheme = prefs_parseLongValue(PREF_DOMAIN_INTERFACE, PREF_SOFTHUD_COLOR, &lVal, 10) ? (interface_colorscheme_t)lVal : RED_ON_BLACK; } static void _init_glalert(void) {