UI: Preserve service hotkey data
This commit is contained in:
parent
23a2228142
commit
9f0696c1d8
@ -406,11 +406,13 @@ bool OBSBasic::LoadService()
|
||||
type = obs_data_get_string(data, "type");
|
||||
|
||||
obs_data_t *settings = obs_data_get_obj(data, "settings");
|
||||
obs_data_t *hotkey_data = obs_data_get_obj(data, "hotkeys");
|
||||
|
||||
service = obs_service_create(type, "default_service", settings,
|
||||
nullptr);
|
||||
hotkey_data);
|
||||
obs_service_release(service);
|
||||
|
||||
obs_data_release(hotkey_data);
|
||||
obs_data_release(settings);
|
||||
obs_data_release(data);
|
||||
|
||||
|
@ -1317,9 +1317,14 @@ void OBSBasicSettings::SaveStream1Settings()
|
||||
{
|
||||
QString streamType = GetComboData(ui->streamType);
|
||||
|
||||
obs_service_t *oldService = main->GetService();
|
||||
obs_data_t *hotkeyData = obs_hotkeys_save_service(oldService);
|
||||
|
||||
obs_service_t *newService = obs_service_create(QT_TO_UTF8(streamType),
|
||||
"default_service", streamProperties->GetSettings(),
|
||||
nullptr);
|
||||
hotkeyData);
|
||||
|
||||
obs_data_release(hotkeyData);
|
||||
if (!newService)
|
||||
return;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user