mirror of
https://github.com/obsproject/obs-studio.git
synced 2024-07-02 09:33:33 +00:00
UI: Adjust preview scrolling clamp values
This commit is contained in:
parent
832ac4bfa8
commit
c54f4371d6
|
@ -2678,6 +2678,9 @@ void OBSBasicPreview::ClampScrollingOffsets()
|
|||
vec3_mulf(&offset, &offset, 0.5f);
|
||||
vec3_maxf(&offset, &offset, 0.0f);
|
||||
|
||||
vec3_divf(&target, &target, 2.0f);
|
||||
vec3_add(&offset, &offset, &target);
|
||||
|
||||
scrollingOffset.x = std::clamp(scrollingOffset.x, -offset.x, offset.x);
|
||||
scrollingOffset.y = std::clamp(scrollingOffset.y, -offset.y, offset.y);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue