提交 4595d49e 编写于 作者: D derrod

UI: Add confirmation dialog for bandwidth test mode

上级 51bfb9d8
......@@ -257,6 +257,10 @@ ConfirmStart.Text="Are you sure you want to start the stream?"
ConfirmStop.Title="Stop Stream?"
ConfirmStop.Text="Are you sure you want to stop the stream?"
# confirm bandwidth test dialog box
ConfirmBWTest.Title="Start Bandwidth Test?"
ConfirmBWTest.Text="You have OBS configured in bandwidth test mode. This mode allows for network testing without your channel going live. Once you are done testing, you will need to disable it in order for viewers to be able to see your stream.\n\nDo you want to continue?"
# confirm exit dialog box
ConfirmExit.Title="Exit OBS?"
ConfirmExit.Text="OBS is currently active. All streams/recordings will be shut down. Are you sure you wish to exit?"
......
......@@ -5519,7 +5519,21 @@ void OBSBasic::on_streamButton_clicked()
bool confirm = config_get_bool(GetGlobalConfig(), "BasicWindow",
"WarnBeforeStartingStream");
if (confirm && isVisible()) {
obs_data_t *settings = obs_service_get_settings(service);
bool bwtest = obs_data_get_bool(settings, "bwtest");
obs_data_release(settings);
if (bwtest && isVisible()) {
QMessageBox::StandardButton button =
OBSMessageBox::question(this,
QTStr("ConfirmBWTest.Title"),
QTStr("ConfirmBWTest.Text"));
if (button == QMessageBox::No) {
ui->streamButton->setChecked(false);
return;
}
} else if (confirm && isVisible()) {
QMessageBox::StandardButton button =
OBSMessageBox::question(this,
QTStr("ConfirmStart.Title"),
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册