mirror of
https://github.com/overte-org/overte.git
synced 2025-08-06 20:58:38 +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) {
|
void RenderScriptingInterface::forceViewportResolutionScale(float scale) {
|
||||||
|
// just not negative values or zero
|
||||||
|
if (scale <= 0.f) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
_renderSettingLock.withWriteLock([&] {
|
_renderSettingLock.withWriteLock([&] {
|
||||||
_viewportResolutionScale = (scale);
|
_viewportResolutionScale = (scale);
|
||||||
_viewportResolutionScaleSetting.set(scale);
|
_viewportResolutionScaleSetting.set(scale);
|
||||||
|
|
Loading…
Reference in a new issue