mirror of
https://github.com/obsproject/obs-studio.git
synced 2024-07-19 17:49:14 +00:00
UI: Add confirmation dialog for bandwidth test mode
This commit is contained in:
parent
51bfb9d899
commit
4595d49e98
|
@ -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"),
|
||||
|
|
Loading…
Reference in a new issue