mirror of
https://github.com/obsproject/obs-studio.git
synced 2026-05-19 22:09:03 -04:00
UI: Adjust preview scrolling clamp values
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user