From 22f2ca43aadddf12231775f8e31af5da6be2da4e Mon Sep 17 00:00:00 2001 From: Exeldro Date: Wed, 5 Jun 2024 21:04:59 +0200 Subject: [PATCH] Try to always get a canvas size --- move-transition.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/move-transition.c b/move-transition.c index 2e3d859..dd3941b 100644 --- a/move-transition.c +++ b/move-transition.c @@ -1266,7 +1266,19 @@ bool render2_item(struct move_info *move, struct move_item *item) vec2_zero(&origin2); uint32_t canvas_width = obs_source_get_width(move->source); + if (!canvas_width && move->scene_source_a) + canvas_width = obs_source_get_width(move->scene_source_a); + if (!canvas_width && move->scene_source_b) + canvas_width = obs_source_get_width(move->scene_source_b); + if (!canvas_width) + canvas_width = obs_source_get_width(source); uint32_t canvas_height = obs_source_get_height(move->source); + if (!canvas_height && move->scene_source_a) + canvas_height = obs_source_get_height(move->scene_source_a); + if (!canvas_height && move->scene_source_b) + canvas_height = obs_source_get_height(move->scene_source_b); + if (!canvas_height) + canvas_height = obs_source_get_height(source); enum obs_bounds_type bt_a = obs_sceneitem_get_bounds_type(item->item_a); enum obs_bounds_type bt_b = obs_sceneitem_get_bounds_type(item->item_b);