UI: Add front-end API functions to get/modify service
This commit adds functions to get, set and save the service and its settings, and is plugged straight into the existing internal functions serving this purpose (Jim: Fixed commit message and missing newline at end of file) Closes jp9000/obs-studio#895
This commit is contained in:
parent
2e0d237341
commit
9f3bb4a13f
4 changed files with 43 additions and 0 deletions
|
|
@ -354,6 +354,21 @@ struct OBSStudioAPI : obs_frontend_callbacks {
|
|||
App()->PopUITranslation();
|
||||
}
|
||||
|
||||
void obs_frontend_set_streaming_service(obs_service_t *service) override
|
||||
{
|
||||
main->SetService(service);
|
||||
}
|
||||
|
||||
obs_service_t *obs_frontend_get_streaming_service(void) override
|
||||
{
|
||||
return main->GetService();
|
||||
}
|
||||
|
||||
void obs_frontend_save_streaming_service(void) override
|
||||
{
|
||||
main->SaveService();
|
||||
}
|
||||
|
||||
void on_load(obs_data_t *settings) override
|
||||
{
|
||||
for (auto cb : saveCallbacks)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue