Showing the changes to interface/src/scripting/RenderScriptingInterface.cpp (1 of 1 file). Show all
Unified · Split
| @@ -159,6 +159,10 @@ void RenderScriptingInterface::setViewportResolutionScale(float scale) { · 158 unmodified lines | |||
| 159 | } | 159 | } |
| 160 | 160 | ||
| 161 | void RenderScriptingInterface::forceViewportResolutionScale(float scale) { | 161 | void RenderScriptingInterface::forceViewportResolutionScale(float scale) { |
| 162 | // just not negative values or zero | ||
| 163 | if (scale <= 0.f) { | ||
| 164 | return; | ||
| 165 | } | ||
| 162 | _renderSettingLock.withWriteLock([&] { | 166 | _renderSettingLock.withWriteLock([&] { |
| 163 | _viewportResolutionScale = (scale); | 167 | _viewportResolutionScale = (scale); |
| 164 | _viewportResolutionScaleSetting.set(scale); | 168 | _viewportResolutionScaleSetting.set(scale); |