mirror of
https://github.com/lubosz/overte.git
synced 2025-04-24 02:53:43 +02:00
Add sanity check for viewport resolution scale to avoid negative value
This commit is contained in:
parent
9470467c31
commit
768dd051aa
1 changed files with 4 additions and 0 deletions
|
@ -159,6 +159,10 @@ void RenderScriptingInterface::setViewportResolutionScale(float scale) {
|
|||
}
|
||||
|
||||
void RenderScriptingInterface::forceViewportResolutionScale(float scale) {
|
||||
// just not negative values or zero
|
||||
if (scale <= 0.f) {
|
||||
return;
|
||||
}
|
||||
_renderSettingLock.withWriteLock([&] {
|
||||
_viewportResolutionScale = (scale);
|
||||
_viewportResolutionScaleSetting.set(scale);
|
||||
|
|
Loading…
Reference in a new issue