diff --git a/UI/data/locale/en-US.ini b/UI/data/locale/en-US.ini
index 7c997f385..cc373bbdc 100644
--- a/UI/data/locale/en-US.ini
+++ b/UI/data/locale/en-US.ini
@@ -262,6 +262,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 stop record dialog box
+ConfirmStopRecord.Title="Stop Recording?"
+ConfirmStopRecord.Text="Are you sure you want to stop recording?"
+
# 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?"
@@ -614,6 +618,7 @@ Basic.Settings.General.EnableAutoUpdates="Automatically check for updates on sta
Basic.Settings.General.OpenStatsOnStartup="Open stats dialog on startup"
Basic.Settings.General.WarnBeforeStartingStream="Show confirmation dialog when starting streams"
Basic.Settings.General.WarnBeforeStoppingStream="Show confirmation dialog when stopping streams"
+Basic.Settings.General.WarnBeforeStoppingRecord="Show confirmation dialog when stopping recording"
Basic.Settings.General.Projectors="Projectors"
Basic.Settings.General.HideProjectorCursor="Hide cursor over projectors"
Basic.Settings.General.ProjectorAlwaysOnTop="Make projectors always on top"
diff --git a/UI/forms/OBSBasicSettings.ui b/UI/forms/OBSBasicSettings.ui
index c93f2f2e6..b63a4ddd7 100644
--- a/UI/forms/OBSBasicSettings.ui
+++ b/UI/forms/OBSBasicSettings.ui
@@ -291,13 +291,20 @@
-
+
+
+ Basic.Settings.General.WarnBeforeStoppingRecord
+
+
+
+ -
Basic.Settings.General.RecordWhenStreaming
- -
+
-
false
@@ -307,14 +314,14 @@
- -
+
-
Basic.Settings.General.ReplayBufferWhileStreaming
- -
+
-
false
@@ -5235,6 +5242,7 @@
openStatsOnStartup
warnBeforeStreamStart
warnBeforeStreamStop
+ warnBeforeRecordStop
recordWhenStreaming
keepRecordStreamStops
replayWhileStreaming
diff --git a/UI/window-basic-main.cpp b/UI/window-basic-main.cpp
index 3bc37ab7b..10817c132 100644
--- a/UI/window-basic-main.cpp
+++ b/UI/window-basic-main.cpp
@@ -5679,6 +5679,20 @@ void OBSBasic::on_streamButton_clicked()
void OBSBasic::on_recordButton_clicked()
{
if (outputHandler->RecordingActive()) {
+ bool confirm = config_get_bool(GetGlobalConfig(), "BasicWindow",
+ "WarnBeforeStoppingRecord");
+
+ if (confirm && isVisible()) {
+ QMessageBox::StandardButton button =
+ OBSMessageBox::question(
+ this, QTStr("ConfirmStopRecord.Title"),
+ QTStr("ConfirmStopRecord.Text"));
+
+ if (button == QMessageBox::No) {
+ ui->recordButton->setChecked(true);
+ return;
+ }
+ }
StopRecording();
} else {
if (!NoSourcesConfirmation()) {
diff --git a/UI/window-basic-settings.cpp b/UI/window-basic-settings.cpp
index 95f8cfa25..43d0a3ad0 100644
--- a/UI/window-basic-settings.cpp
+++ b/UI/window-basic-settings.cpp
@@ -306,6 +306,7 @@ OBSBasicSettings::OBSBasicSettings(QWidget *parent)
HookWidget(ui->openStatsOnStartup, CHECK_CHANGED, GENERAL_CHANGED);
HookWidget(ui->warnBeforeStreamStart,CHECK_CHANGED, GENERAL_CHANGED);
HookWidget(ui->warnBeforeStreamStop, CHECK_CHANGED, GENERAL_CHANGED);
+ HookWidget(ui->warnBeforeRecordStop, CHECK_CHANGED, GENERAL_CHANGED);
HookWidget(ui->hideProjectorCursor, CHECK_CHANGED, GENERAL_CHANGED);
HookWidget(ui->projectorAlwaysOnTop, CHECK_CHANGED, GENERAL_CHANGED);
HookWidget(ui->recordWhenStreaming, CHECK_CHANGED, GENERAL_CHANGED);
@@ -1121,6 +1122,10 @@ void OBSBasicSettings::LoadGeneralSettings()
GetGlobalConfig(), "BasicWindow", "WarnBeforeStoppingStream");
ui->warnBeforeStreamStop->setChecked(warnBeforeStreamStop);
+ bool warnBeforeRecordStop = config_get_bool(
+ GetGlobalConfig(), "BasicWindow", "WarnBeforeStoppingRecord");
+ ui->warnBeforeRecordStop->setChecked(warnBeforeRecordStop);
+
bool hideProjectorCursor = config_get_bool(
GetGlobalConfig(), "BasicWindow", "HideProjectorCursor");
ui->hideProjectorCursor->setChecked(hideProjectorCursor);
@@ -2760,6 +2765,9 @@ void OBSBasicSettings::SaveGeneralSettings()
config_set_bool(GetGlobalConfig(), "BasicWindow",
"WarnBeforeStoppingStream",
ui->warnBeforeStreamStop->isChecked());
+ config_set_bool(GetGlobalConfig(), "BasicWindow",
+ "WarnBeforeStoppingRecord",
+ ui->warnBeforeRecordStop->isChecked());
config_set_bool(GetGlobalConfig(), "BasicWindow", "HideProjectorCursor",
ui->hideProjectorCursor->isChecked());