提交 02373359 编写于 作者: R Richard Stanway

UI: Unset bandwidth test on non-Twitch service / disconnect

For additional safety, uncheck the bandwidth test checkbox so that the
setting isn't persisted in an enabled state when disconnecting or
switching a service. Also just straight up disable if not authed to
Twitch when saving settings.
上级 063c69ad
......@@ -177,9 +177,6 @@ void OBSBasicSettings::SaveStream1Settings()
}
}
obs_data_set_bool(settings, "bwtest",
ui->bandwidthTestEnable->isChecked());
if (!!auth && strcmp(auth->service(), "Twitch") == 0) {
bool choiceExists = config_has_user_value(
main->Config(), "Twitch", "AddonChoice");
......@@ -192,6 +189,11 @@ void OBSBasicSettings::SaveStream1Settings()
if (choiceExists && currentChoice != newChoice)
forceAuthReload = true;
obs_data_set_bool(settings, "bwtest",
ui->bandwidthTestEnable->isChecked());
} else {
obs_data_set_bool(settings, "bwtest", false);
}
obs_data_set_string(settings, "key", QT_TO_UTF8(ui->key->text()));
......@@ -470,6 +472,8 @@ void OBSBasicSettings::OnOAuthStreamKeyConnected()
ui->bandwidthTestEnable->setVisible(true);
ui->twitchAddonLabel->setVisible(true);
ui->twitchAddonDropdown->setVisible(true);
} else {
ui->bandwidthTestEnable->setChecked(false);
}
}
......@@ -530,6 +534,8 @@ void OBSBasicSettings::on_disconnectAccount_clicked()
OAuth::DeleteCookies(service);
#endif
ui->bandwidthTestEnable->setChecked(false);
ui->streamKeyWidget->setVisible(true);
ui->streamKeyLabel->setVisible(true);
ui->connectAccount2->setVisible(true);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册