From 52c3f81f0e7d201c5f16a766f97c444b123f788b Mon Sep 17 00:00:00 2001 From: Clayton Groeneveld Date: Tue, 23 Apr 2019 22:58:01 -0500 Subject: [PATCH] UI: Fix theme bug when updating from older versions Fixes: https://obsproject.com/mantis/view.php?id=1446 --- UI/obs-app.cpp | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/UI/obs-app.cpp b/UI/obs-app.cpp index c76ebd72d..40b897405 100644 --- a/UI/obs-app.cpp +++ b/UI/obs-app.cpp @@ -1029,21 +1029,20 @@ bool OBSApp::InitTheme() const char *themeName = config_get_string(globalConfig, "General", "CurrentTheme"); - if (themeName && strcmp(themeName, "Default") == 0) - themeName = "System"; - if (!themeName) { /* Use deprecated "Theme" value if available */ themeName = config_get_string(globalConfig, "General", "Theme"); if (!themeName) themeName = DEFAULT_THEME; + if (!themeName) + themeName = "Dark"; } - if (strcmp(themeName, DEFAULT_THEME) != 0 && SetTheme(themeName)) - return true; + if (strcmp(themeName, "Default") == 0) + themeName = "System"; - return SetTheme(DEFAULT_THEME); + return SetTheme(themeName); } OBSApp::OBSApp(int &argc, char **argv, profiler_name_store_t *store)