UI: Add ShutDownActiveOutputsOnExit setting
Adds a new setting to the general OBS settings, which can be checked in order to no longer show the "confirm close" dialog when there are still streams/recordings running.
This commit is contained in:
parent
9ef76e1f9b
commit
1b280e0ac4
@ -993,6 +993,7 @@ Basic.Settings.Audio.Disabled="Disabled"
|
||||
|
||||
# basic mode 'advanced' settings
|
||||
Basic.Settings.Advanced="Advanced"
|
||||
Basic.Settings.Advanced.General.ConfirmOnExit="Show active outputs warning on exit"
|
||||
Basic.Settings.Advanced.General.ProcessPriority="Process Priority"
|
||||
Basic.Settings.Advanced.General.ProcessPriority.High="High"
|
||||
Basic.Settings.Advanced.General.ProcessPriority.AboveNormal="Above Normal"
|
||||
|
@ -4800,6 +4800,13 @@
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item row="2" column="1">
|
||||
<widget class="QCheckBox" name="confirmOnExit">
|
||||
<property name="text">
|
||||
<string>Basic.Settings.Advanced.General.ConfirmOnExit</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
@ -5722,6 +5729,7 @@
|
||||
<tabstop>fpsDenominator</tabstop>
|
||||
<tabstop>scrollArea</tabstop>
|
||||
<tabstop>processPriority</tabstop>
|
||||
<tabstop>confirmOnExit</tabstop>
|
||||
<tabstop>renderer</tabstop>
|
||||
<tabstop>adapter</tabstop>
|
||||
<tabstop>colorFormat</tabstop>
|
||||
|
@ -419,6 +419,8 @@ bool OBSApp::InitGlobalConfigDefaults()
|
||||
config_set_default_bool(globalConfig, "General", "EnableAutoUpdates",
|
||||
true);
|
||||
|
||||
config_set_default_bool(globalConfig, "General", "ConfirmOnExit", true);
|
||||
|
||||
#if _WIN32
|
||||
config_set_default_string(globalConfig, "Video", "Renderer",
|
||||
"Direct3D 11");
|
||||
|
@ -4531,7 +4531,10 @@ void OBSBasic::closeEvent(QCloseEvent *event)
|
||||
"geometry",
|
||||
saveGeometry().toBase64().constData());
|
||||
|
||||
if (outputHandler && outputHandler->Active()) {
|
||||
bool confirmOnExit =
|
||||
config_get_bool(GetGlobalConfig(), "General", "ConfirmOnExit");
|
||||
|
||||
if (confirmOnExit && outputHandler && outputHandler->Active()) {
|
||||
SetShowing(true);
|
||||
|
||||
QMessageBox::StandardButton button = OBSMessageBox::question(
|
||||
|
@ -554,6 +554,7 @@ OBSBasicSettings::OBSBasicSettings(QWidget *parent)
|
||||
HookWidget(ui->reconnectRetryDelay, SCROLL_CHANGED, ADV_CHANGED);
|
||||
HookWidget(ui->reconnectMaxRetries, SCROLL_CHANGED, ADV_CHANGED);
|
||||
HookWidget(ui->processPriority, COMBO_CHANGED, ADV_CHANGED);
|
||||
HookWidget(ui->confirmOnExit, CHECK_CHANGED, ADV_CHANGED);
|
||||
HookWidget(ui->bindToIP, COMBO_CHANGED, ADV_CHANGED);
|
||||
HookWidget(ui->enableNewSocketLoop, CHECK_CHANGED, ADV_CHANGED);
|
||||
HookWidget(ui->enableLowLatencyMode, CHECK_CHANGED, ADV_CHANGED);
|
||||
@ -627,7 +628,6 @@ OBSBasicSettings::OBSBasicSettings(QWidget *parent)
|
||||
delete ui->adapter;
|
||||
delete ui->processPriorityLabel;
|
||||
delete ui->processPriority;
|
||||
delete ui->advancedGeneralGroupBox;
|
||||
delete ui->enableNewSocketLoop;
|
||||
delete ui->enableLowLatencyMode;
|
||||
#ifdef __linux__
|
||||
@ -643,7 +643,6 @@ OBSBasicSettings::OBSBasicSettings(QWidget *parent)
|
||||
ui->adapter = nullptr;
|
||||
ui->processPriorityLabel = nullptr;
|
||||
ui->processPriority = nullptr;
|
||||
ui->advancedGeneralGroupBox = nullptr;
|
||||
ui->enableNewSocketLoop = nullptr;
|
||||
ui->enableLowLatencyMode = nullptr;
|
||||
#ifdef __linux__
|
||||
@ -2512,6 +2511,10 @@ void OBSBasicSettings::LoadAdvancedSettings()
|
||||
bool dynBitrate =
|
||||
config_get_bool(main->Config(), "Output", "DynamicBitrate");
|
||||
|
||||
bool confirmOnExit =
|
||||
config_get_bool(GetGlobalConfig(), "General", "ConfirmOnExit");
|
||||
ui->confirmOnExit->setChecked(confirmOnExit);
|
||||
|
||||
loading = true;
|
||||
|
||||
LoadRendererList();
|
||||
@ -3257,6 +3260,10 @@ void OBSBasicSettings::SaveAdvancedSettings()
|
||||
}
|
||||
#endif
|
||||
|
||||
if (WidgetChanged(ui->confirmOnExit))
|
||||
config_set_bool(GetGlobalConfig(), "General", "ConfirmOnExit",
|
||||
ui->confirmOnExit->isChecked());
|
||||
|
||||
SaveEdit(ui->filenameFormatting, "Output", "FilenameFormatting");
|
||||
SaveEdit(ui->simpleRBPrefix, "SimpleOutput", "RecRBPrefix");
|
||||
SaveEdit(ui->simpleRBSuffix, "SimpleOutput", "RecRBSuffix");
|
||||
|
Loading…
x
Reference in New Issue
Block a user