diff --git a/UI/window-basic-preview.cpp b/UI/window-basic-preview.cpp index 588c74212..859407478 100644 --- a/UI/window-basic-preview.cpp +++ b/UI/window-basic-preview.cpp @@ -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); }