mirror of
https://github.com/obsproject/obs-studio.git
synced 2026-04-27 18:13:16 -04:00
UI: Add options to enable/disable stream confirm dialogs
Some streamers would accidentally hit start/stop streaming, which on certain services would send out mass emails to all their followers. This just adds options to general settings to optionally enable dialogs that confirm whether to actually start/stop streaming when the button is clicked.
This commit is contained in:
@@ -3267,8 +3267,34 @@ void OBSBasic::RecordingStop(int code)
|
||||
void OBSBasic::on_streamButton_clicked()
|
||||
{
|
||||
if (outputHandler->StreamingActive()) {
|
||||
bool confirm = config_get_bool(GetGlobalConfig(), "BasicWindow",
|
||||
"WarnBeforeStoppingStream");
|
||||
|
||||
if (confirm) {
|
||||
QMessageBox::StandardButton button =
|
||||
QMessageBox::question(this,
|
||||
QTStr("ConfirmStop.Title"),
|
||||
QTStr("ConfirmStop.Text"));
|
||||
|
||||
if (button == QMessageBox::No)
|
||||
return;
|
||||
}
|
||||
|
||||
StopStreaming();
|
||||
} else {
|
||||
bool confirm = config_get_bool(GetGlobalConfig(), "BasicWindow",
|
||||
"WarnBeforeStartingStream");
|
||||
|
||||
if (confirm) {
|
||||
QMessageBox::StandardButton button =
|
||||
QMessageBox::question(this,
|
||||
QTStr("ConfirmStart.Title"),
|
||||
QTStr("ConfirmStart.Text"));
|
||||
|
||||
if (button == QMessageBox::No)
|
||||
return;
|
||||
}
|
||||
|
||||
StartStreaming();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user