Merge pull request #899 from Palakis/preview-api
UI: Add functions and events for Studio Mode into the Frontend API
This commit is contained in:
commit
27bb2f836d
5 changed files with 83 additions and 1 deletions
|
|
@ -585,6 +585,9 @@ void OBSBasic::SetCurrentScene(OBSSource scene, bool force)
|
|||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (api && IsPreviewProgramMode())
|
||||
api->on_event(OBS_FRONTEND_EVENT_PREVIEW_SCENE_CHANGED);
|
||||
}
|
||||
|
||||
UpdateSceneSelection(scene);
|
||||
|
|
@ -1009,6 +1012,9 @@ void OBSBasic::SetPreviewProgramMode(bool enabled)
|
|||
ui->previewLayout->addWidget(program);
|
||||
program->show();
|
||||
|
||||
if (api)
|
||||
api->on_event(OBS_FRONTEND_EVENT_STUDIO_MODE_ENABLED);
|
||||
|
||||
blog(LOG_INFO, "Switched to Preview/Program mode");
|
||||
blog(LOG_INFO, "-----------------------------"
|
||||
"-------------------");
|
||||
|
|
@ -1039,6 +1045,9 @@ void OBSBasic::SetPreviewProgramMode(bool enabled)
|
|||
if (!previewEnabled)
|
||||
EnablePreviewDisplay(false);
|
||||
|
||||
if (api)
|
||||
api->on_event(OBS_FRONTEND_EVENT_STUDIO_MODE_DISABLED);
|
||||
|
||||
blog(LOG_INFO, "Switched to regular Preview mode");
|
||||
blog(LOG_INFO, "-----------------------------"
|
||||
"-------------------");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue