Browse Source

libobs: Re-include groups in obs_enum_scenes

[1] changes this condition to obs_source_is_scene as a drive-by, however
they aren't equivalent. obs_source_is_scene checks whether the source's
is is "scene", which doesn't include groups, while OBS_SOURCE_TYPE_SCENE
does. Suddenly not including groups is quite the API break.
This now means obs_canvas_enum_scenes does also include groups, however
that is much less of an egregious API change.

[1]: 8c5858ae058f05f665d7d581f25ea6c4d711a0fc
Sebastian Beckmann 1 month ago
parent
commit
11b9f1aa83
1 changed files with 1 additions and 1 deletions
  1. 1 1
      libobs/obs.c

+ 1 - 1
libobs/obs.c

@@ -1852,7 +1852,7 @@ void obs_canvas_enum_scenes(obs_canvas_t *canvas, bool (*enum_proc)(void *, obs_
 	while (source) {
 		obs_source_t *s = obs_source_get_ref(source);
 		if (s) {
-			if (obs_source_is_scene(source) && !enum_proc(param, s)) {
+			if (source->info.type == OBS_SOURCE_TYPE_SCENE && !enum_proc(param, s)) {
 				obs_source_release(s);
 				break;
 			}