libobs: Add obs_group_or_scene_from_source()
Makes it a little bit easier to get a scene from either a source or group.
This commit is contained in:
parent
a05b6f7280
commit
6b2c3f4845
@ -1772,6 +1772,13 @@ EXPORT void obs_sceneitem_group_enum_items(obs_sceneitem_t *group,
|
||||
/** Gets the group from its source, or NULL if not a group */
|
||||
EXPORT obs_scene_t *obs_group_from_source(const obs_source_t *source);
|
||||
|
||||
static inline obs_scene_t *
|
||||
obs_group_or_scene_from_source(const obs_source_t *source)
|
||||
{
|
||||
obs_scene_t *s = obs_scene_from_source(source);
|
||||
return s ? s : obs_group_from_source(source);
|
||||
}
|
||||
|
||||
EXPORT void obs_sceneitem_defer_group_resize_begin(obs_sceneitem_t *item);
|
||||
EXPORT void obs_sceneitem_defer_group_resize_end(obs_sceneitem_t *item);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user