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:
Jim
2017-06-27 19:39:53 -07:00
committed by GitHub
5 changed files with 83 additions and 1 deletions

View File

@@ -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, "-----------------------------"
"-------------------");