|
|
@@ -414,8 +414,9 @@ static vec2 GetItemSize(obs_sceneitem_t *item)
|
|
|
|
|
|
obs_sceneitem_get_scale(item, &scale);
|
|
|
obs_sceneitem_get_crop(item, &crop);
|
|
|
- size.x = float(obs_source_get_width(source) - crop.left - crop.right) * scale.x;
|
|
|
- size.y = float(obs_source_get_height(source) - crop.top - crop.bottom) * scale.y;
|
|
|
+ size.x = fmaxf(float((int)obs_source_get_width(source) - crop.left - crop.right), 0.0f);
|
|
|
+ size.y = fmaxf(float((int)obs_source_get_height(source) - crop.top - crop.bottom), 0.0f);
|
|
|
+ vec2_mul(&size, &size, &scale);
|
|
|
}
|
|
|
|
|
|
return size;
|