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:
parent
03a94aee41
commit
b464ba8129
2 changed files with 5 additions and 1 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue