| 50 | } |
| 51 | |
| 52 | static OBSWeakSource getWeakSceneSourceByName(const OBSWeakCanvas &weakCanvas, |
| 53 | const char *name) |
| 54 | { |
| 55 | #if LIBOBS_API_VER < MAKE_SEMANTIC_VERSION(31, 1, 0) |
| 56 | return GetWeakSourceByName(name); |
| 57 | #else |
| 58 | if (!weakCanvas) { |
| 59 | return nullptr; |
| 60 | } |
| 61 | |
| 62 | OBSCanvasAutoRelease canvas = obs_weak_canvas_get_canvas(weakCanvas); |
| 63 | if (!canvas) { |
| 64 | return nullptr; |
| 65 | } |
| 66 | |
| 67 | OBSSourceAutoRelease source = |
| 68 | obs_canvas_get_source_by_name(canvas, name); |
| 69 | OBSWeakSource scene = OBSGetWeakRef(source); |
| 70 | return scene; |
| 71 | #endif |
| 72 | } |
| 73 | |
| 74 | void SceneSelection::Load(obs_data_t *obj, const char *name, |
| 75 | const char *typeName) |
no test coverage detected