summaryrefslogtreecommitdiff
path: root/scene
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <remi@verschelde.fr>2022-01-23 17:27:10 +0100
committerGitHub <noreply@github.com>2022-01-23 17:27:10 +0100
commitdda6d2674aa467447840dc9f05725e99e0ba4c5f (patch)
tree0fa22f8c9f108b02a93dc563011e3ca7816df4d2 /scene
parenteb5aa3218f6b29b82d14468368c6388b923b89fd (diff)
parentd009aa4d022ca72c247c70dddfd219548b3111fb (diff)
Merge pull request #57082 from madmiraal/fix-50802
Diffstat (limited to 'scene')
-rw-r--r--scene/main/viewport.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/scene/main/viewport.cpp b/scene/main/viewport.cpp
index 2cdafefba7..b94d109785 100644
--- a/scene/main/viewport.cpp
+++ b/scene/main/viewport.cpp
@@ -790,7 +790,7 @@ void Viewport::update_canvas_items() {
}
void Viewport::_set_size(const Size2i &p_size, const Size2i &p_size_2d_override, const Rect2i &p_to_screen_rect, const Transform2D &p_stretch_transform, bool p_allocated) {
- if (size == p_size && size_allocated == p_allocated && stretch_transform == p_stretch_transform && p_size_2d_override == size_2d_override && to_screen_rect != p_to_screen_rect) {
+ if (size == p_size && size_allocated == p_allocated && stretch_transform == p_stretch_transform && p_size_2d_override == size_2d_override && to_screen_rect == p_to_screen_rect) {
return;
}
@@ -1090,7 +1090,7 @@ Transform2D Viewport::_get_input_pre_xform() const {
if (to_screen_rect.size.x != 0 && to_screen_rect.size.y != 0) {
pre_xf.elements[2] = -to_screen_rect.position;
- pre_xf.scale(size / to_screen_rect.size);
+ pre_xf.scale(Vector2(size) / to_screen_rect.size);
}
return pre_xf;