libobs: Make callback optional for obs_load_sources
Due to the ability to track creation of scenes via the "source_created" global signal, the callback parameter of obs_load_sources has become somewhat obsolete. This change allows the ability to pass NULL to the callback parameter in case the callback is not needed.
This commit is contained in:
@@ -1642,7 +1642,8 @@ void obs_load_sources(obs_data_array_t *array, obs_load_source_cb cb,
|
||||
if (source->info.type == OBS_SOURCE_TYPE_TRANSITION)
|
||||
obs_transition_load(source, source_data);
|
||||
obs_source_load(source);
|
||||
cb(private_data, source);
|
||||
if (cb)
|
||||
cb(private_data, source);
|
||||
}
|
||||
obs_data_release(source_data);
|
||||
}
|
||||
|
Reference in New Issue
Block a user