Preventing display glitch from invalid scaling of view

This commit is contained in:
brunoherbelin
2021-03-27 23:31:18 +01:00
parent 6687bdd258
commit 8a75664264
3 changed files with 14 additions and 0 deletions

View File

@@ -144,6 +144,11 @@ void GeometryView::update(float dt)
}
output_surface_->setTextureIndex( output->texture() );
}
// prevent invalid scaling
float s = CLAMP(scene.root()->scale_.x, GEOMETRY_MIN_SCALE, GEOMETRY_MAX_SCALE);
scene.root()->scale_.x = s;
scene.root()->scale_.y = s;
}
// the current view is the geometry view