mirror of
https://github.com/obsproject/obs-studio.git
synced 2026-07-19 11:44:38 -04:00
UI: Add preload callbacks to frontend API
Allows loading data before actually loading any scene data.
This commit is contained in:
@@ -762,6 +762,10 @@ void OBSBasic::Load(const char *file)
|
||||
ClearSceneData();
|
||||
InitDefaultTransitions();
|
||||
|
||||
obs_data_t *modulesObj = obs_data_get_obj(data, "modules");
|
||||
if (api)
|
||||
api->on_preload(modulesObj);
|
||||
|
||||
obs_data_array_t *sceneOrder = obs_data_get_array(data, "scene_order");
|
||||
obs_data_array_t *sources = obs_data_get_array(data, "sources");
|
||||
obs_data_array_t *transitions= obs_data_get_array(data, "transitions");
|
||||
@@ -925,12 +929,10 @@ retryScene:
|
||||
|
||||
/* ---------------------- */
|
||||
|
||||
if (api) {
|
||||
obs_data_t *modulesObj = obs_data_get_obj(data, "modules");
|
||||
if (api)
|
||||
api->on_load(modulesObj);
|
||||
obs_data_release(modulesObj);
|
||||
}
|
||||
|
||||
obs_data_release(modulesObj);
|
||||
obs_data_release(data);
|
||||
|
||||
if (!opt_starting_scene.empty())
|
||||
|
||||
Reference in New Issue
Block a user