mirror of
https://github.com/obsproject/obs-studio.git
synced 2026-09-24 23:31:36 +08:00
UI: Ensure theme backward compat. with older OBS vers.
Deprecates "Theme" global config value and uses "CurrentTheme" instead to ensure backward compatibility with older versions of OBS, which will fail to load if you have a theme that isn't available. (Jim Edit: Putting this back because I misunderstood the purpose of jp9000/obs-studio#936)
This commit is contained in:
+8
-3
@@ -737,9 +737,14 @@ bool OBSApp::SetTheme(std::string name, std::string path)
|
||||
bool OBSApp::InitTheme()
|
||||
{
|
||||
const char *themeName = config_get_string(globalConfig, "General",
|
||||
"Theme");
|
||||
if (!themeName)
|
||||
themeName = "Default";
|
||||
"CurrentTheme");
|
||||
if (!themeName) {
|
||||
/* Use deprecated "Theme" value if available */
|
||||
themeName = config_get_string(globalConfig,
|
||||
"General", "Theme");
|
||||
if (!themeName)
|
||||
themeName = "Default";
|
||||
}
|
||||
|
||||
if (strcmp(themeName, "Default") != 0 && SetTheme(themeName))
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user