UI: Fix theme bug when updating from older versions

Fixes: https://obsproject.com/mantis/view.php?id=1446
This commit is contained in:
Clayton Groeneveld 2019-04-23 22:58:01 -05:00
parent 5781605289
commit 52c3f81f0e

View File

@ -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)