libobs: Fix bug where cropped items would recalc transform
Fixes a bug where items that had cropping would recalculate transform every frame. obs_scene_item::last_width and obs_scene_item::last_height would be set to the cropped sizes rather than the source's actual size.master
parent
df88140e6a
commit
b3dfd7ef80
|
@ -323,6 +323,9 @@ static void update_item_transform(struct obs_scene_item *item)
|
||||||
if (os_atomic_load_long(&item->defer_update) > 0)
|
if (os_atomic_load_long(&item->defer_update) > 0)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
item->last_width = width;
|
||||||
|
item->last_height = height;
|
||||||
|
|
||||||
width = cx;
|
width = cx;
|
||||||
height = cy;
|
height = cy;
|
||||||
|
|
||||||
|
@ -375,9 +378,6 @@ static void update_item_transform(struct obs_scene_item *item)
|
||||||
|
|
||||||
/* ----------------------- */
|
/* ----------------------- */
|
||||||
|
|
||||||
item->last_width = width;
|
|
||||||
item->last_height = height;
|
|
||||||
|
|
||||||
calldata_init_fixed(¶ms, stack, sizeof(stack));
|
calldata_init_fixed(¶ms, stack, sizeof(stack));
|
||||||
calldata_set_ptr(¶ms, "scene", item->parent);
|
calldata_set_ptr(¶ms, "scene", item->parent);
|
||||||
calldata_set_ptr(¶ms, "item", item);
|
calldata_set_ptr(¶ms, "item", item);
|
||||||
|
|
Loading…
Reference in New Issue