Skip to content

Commit

Permalink
UI: Switch to beta branch when running beta/rc for the first time
Browse files Browse the repository at this point in the history
  • Loading branch information
derrod committed Nov 22, 2022
1 parent f141b9c commit dc7a202
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions UI/window-basic-main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2027,6 +2027,18 @@ void OBSBasic::OBSInit()
QMetaObject::invokeMethod(this, "on_autoConfigure_triggered",
Qt::QueuedConnection);

#if OBS_RELEASE_CANDIDATE > 0 || OBS_BETA > 0
/* Automatically set branch to "beta" the first time a pre-release build is run. */
if (!config_get_bool(App()->GlobalConfig(), "General",
"AutoBetaOptIn")) {
config_set_string(App()->GlobalConfig(), "General",
"UpdateBranch", "beta");
config_set_bool(App()->GlobalConfig(), "General",
"AutoBetaOptIn", true);
config_save_safe(App()->GlobalConfig(), "tmp", nullptr);
}
#endif

ToggleMixerLayout(config_get_bool(App()->GlobalConfig(), "BasicWindow",
"VerticalVolControl"));

Expand Down

0 comments on commit dc7a202

Please sign in to comment.