Skip to content

Commit

Permalink
libobs: Fix crop values for new nested scene sources being incorrect
Browse files Browse the repository at this point in the history
  • Loading branch information
derrod authored and RytoEX committed Sep 26, 2024
1 parent a0edc5e commit 5fea7d3
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions libobs/obs-scene.c
Original file line number Diff line number Diff line change
Expand Up @@ -619,6 +619,9 @@ static inline void log_matrix(const struct matrix4 *mat, const char *name)
static inline void update_nested_scene_crop(struct obs_scene_item *item,
uint32_t width, uint32_t height)
{
if (!item->last_height || !item->last_width)
return;

/* Use last size and new size to calculate factor to adjust crop by. */
float scale_x = (float)width / (float)item->last_width;
float scale_y = (float)height / (float)item->last_height;
Expand Down

0 comments on commit 5fea7d3

Please sign in to comment.