mirror of
https://github.com/obsproject/obs-studio.git
synced 2026-05-03 21:06:11 -04:00
UI: Set min/max zoom levels for preview
Prevents the preview from zooming in or out too far. Min zoom: 10% Max zoom: 1000%
This commit is contained in:
@@ -2255,6 +2255,8 @@ void OBSBasicPreview::ResetScrollingOffset()
|
||||
|
||||
void OBSBasicPreview::SetScalingLevel(int32_t newScalingLevelVal)
|
||||
{
|
||||
newScalingLevelVal = std::clamp(newScalingLevelVal, -MAX_SCALING_LEVEL,
|
||||
MAX_SCALING_LEVEL);
|
||||
float newScalingAmountVal =
|
||||
pow(ZOOM_SENSITIVITY, float(newScalingLevelVal));
|
||||
scalingLevel = newScalingLevelVal;
|
||||
|
||||
Reference in New Issue
Block a user