UI: Add option to automatically record while streaming
Allows the ability for users to make it so recording automatically starts when they start streaming. Also adds the option to allow the recording to continue when stream is stopped. Closes jp9000/obs-studio#554
This commit is contained in:
parent
563d8efe46
commit
2dfb211956
5 changed files with 175 additions and 98 deletions
|
|
@ -272,6 +272,8 @@ OBSBasicSettings::OBSBasicSettings(QWidget *parent)
|
|||
HookWidget(ui->warnBeforeStreamStart,CHECK_CHANGED, GENERAL_CHANGED);
|
||||
HookWidget(ui->warnBeforeStreamStop, CHECK_CHANGED, GENERAL_CHANGED);
|
||||
HookWidget(ui->hideProjectorCursor, CHECK_CHANGED, GENERAL_CHANGED);
|
||||
HookWidget(ui->recordWhenStreaming, CHECK_CHANGED, GENERAL_CHANGED);
|
||||
HookWidget(ui->keepRecordStreamStops,CHECK_CHANGED, GENERAL_CHANGED);
|
||||
HookWidget(ui->snappingEnabled, CHECK_CHANGED, GENERAL_CHANGED);
|
||||
HookWidget(ui->screenSnapping, CHECK_CHANGED, GENERAL_CHANGED);
|
||||
HookWidget(ui->centerSnapping, CHECK_CHANGED, GENERAL_CHANGED);
|
||||
|
|
@ -795,6 +797,14 @@ void OBSBasicSettings::LoadGeneralSettings()
|
|||
LoadLanguageList();
|
||||
LoadThemeList();
|
||||
|
||||
bool recordWhenStreaming = config_get_bool(GetGlobalConfig(),
|
||||
"BasicWindow", "RecordWhenStreaming");
|
||||
ui->recordWhenStreaming->setChecked(recordWhenStreaming);
|
||||
|
||||
bool keepRecordStreamStops = config_get_bool(GetGlobalConfig(),
|
||||
"BasicWindow", "KeepRecordingWhenStreamStops");
|
||||
ui->keepRecordStreamStops->setChecked(keepRecordStreamStops);
|
||||
|
||||
bool snappingEnabled = config_get_bool(GetGlobalConfig(),
|
||||
"BasicWindow", "SnappingEnabled");
|
||||
ui->snappingEnabled->setChecked(snappingEnabled);
|
||||
|
|
@ -815,7 +825,6 @@ void OBSBasicSettings::LoadGeneralSettings()
|
|||
"BasicWindow", "SnapDistance");
|
||||
ui->snapDistance->setValue(snapDistance);
|
||||
|
||||
|
||||
bool warnBeforeStreamStart = config_get_bool(GetGlobalConfig(),
|
||||
"BasicWindow", "WarnBeforeStartingStream");
|
||||
ui->warnBeforeStreamStart->setChecked(warnBeforeStreamStart);
|
||||
|
|
@ -2166,6 +2175,15 @@ void OBSBasicSettings::SaveGeneralSettings()
|
|||
config_set_bool(GetGlobalConfig(), "BasicWindow",
|
||||
"HideProjectorCursor",
|
||||
ui->hideProjectorCursor->isChecked());
|
||||
|
||||
if (WidgetChanged(ui->recordWhenStreaming))
|
||||
config_set_bool(GetGlobalConfig(), "BasicWindow",
|
||||
"RecordWhenStreaming",
|
||||
ui->recordWhenStreaming->isChecked());
|
||||
if (WidgetChanged(ui->keepRecordStreamStops))
|
||||
config_set_bool(GetGlobalConfig(), "BasicWindow",
|
||||
"KeepRecordingWhenStreamStops",
|
||||
ui->keepRecordStreamStops->isChecked());
|
||||
}
|
||||
|
||||
void OBSBasicSettings::SaveStream1Settings()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue