UI: Save virtual camera outside of the modules object
Save the configuration outside of the modules object meant for plugins in the scene collection.master
parent
ccfe300f72
commit
f41404528a
|
@ -729,6 +729,8 @@ void OBSBasic::Save(const char *file)
|
|||
obs_data_set_double(saveData, "scaling_off_y",
|
||||
ui->preview->GetScrollY());
|
||||
|
||||
OBSBasicVCamConfig::SaveData(saveData, true);
|
||||
|
||||
if (api) {
|
||||
OBSDataAutoRelease moduleObj = obs_data_create();
|
||||
api->on_save(moduleObj);
|
||||
|
@ -1141,6 +1143,8 @@ retryScene:
|
|||
ui->preview->SetFixedScaling(fixedScaling);
|
||||
emit ui->preview->DisplayResized();
|
||||
|
||||
OBSBasicVCamConfig::SaveData(data, false);
|
||||
|
||||
/* ---------------------- */
|
||||
|
||||
if (api)
|
||||
|
|
|
@ -133,7 +133,7 @@ void OBSBasicVCamConfig::Save()
|
|||
UpdateOutputSource();
|
||||
}
|
||||
|
||||
static void SaveCallback(obs_data_t *data, bool saving, void *)
|
||||
void OBSBasicVCamConfig::SaveData(obs_data_t *data, bool saving)
|
||||
{
|
||||
if (saving) {
|
||||
OBSDataAutoRelease obj = obs_data_create();
|
||||
|
@ -189,7 +189,6 @@ void OBSBasicVCamConfig::Init()
|
|||
|
||||
vCamConfig = &staticConfig;
|
||||
|
||||
obs_frontend_add_save_callback(SaveCallback, nullptr);
|
||||
obs_frontend_add_event_callback(EventCallback, nullptr);
|
||||
}
|
||||
|
||||
|
|
|
@ -17,6 +17,7 @@ public:
|
|||
static void DestroyView();
|
||||
|
||||
static void UpdateOutputSource();
|
||||
static void SaveData(obs_data_t *data, bool saving);
|
||||
|
||||
explicit OBSBasicVCamConfig(QWidget *parent = 0);
|
||||
|
||||
|
|
Loading…
Reference in New Issue