diff options
author | Juan Linietsky <reduzio@gmail.com> | 2016-06-29 18:27:12 -0300 |
---|---|---|
committer | Juan Linietsky <reduzio@gmail.com> | 2016-06-29 18:27:12 -0300 |
commit | e5fc62cc4b8ec6440fa4badb5b9ff4bbe92bdc04 (patch) | |
tree | b2489136d1dd6eb63b247fedbb739cb7c21d6206 | |
parent | 22d52276637164f8929e10b57a3d6cf8a79db69e (diff) |
remove unnecesary warning, closes #5169
-rw-r--r-- | scene/main/viewport.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/scene/main/viewport.cpp b/scene/main/viewport.cpp index ff8f0d05f1..68f5a252e5 100644 --- a/scene/main/viewport.cpp +++ b/scene/main/viewport.cpp @@ -1331,11 +1331,11 @@ Matrix32 Viewport::_get_input_pre_xform() const { Matrix32 pre_xf; if (render_target) { - ERR_FAIL_COND_V(to_screen_rect.size.x==0,pre_xf); - ERR_FAIL_COND_V(to_screen_rect.size.y==0,pre_xf); + if (to_screen_rect!=Rect2()) { - pre_xf.elements[2]=-to_screen_rect.pos; - pre_xf.scale(rect.size/to_screen_rect.size); + pre_xf.elements[2]=-to_screen_rect.pos; + pre_xf.scale(rect.size/to_screen_rect.size); + } } else { pre_xf.elements[2]=-rect.pos; |