summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoropl- <opl-@users.noreply.github.com>2020-07-31 17:38:34 +0200
committeropl- <opl-@users.noreply.github.com>2020-07-31 17:38:34 +0200
commit48d55e46d064900074848988ed30fcff2214ece1 (patch)
treea3fce858b5dc83c64614df63e3ab13d06fe4f30b
parent5d880bf7db7f46b1509bbe3ed704ea8acbf8e151 (diff)
Fix window max_size acting as min_size
-rw-r--r--scene/main/window.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/scene/main/window.cpp b/scene/main/window.cpp
index 8c985242f1..a5c5be8a44 100644
--- a/scene/main/window.cpp
+++ b/scene/main/window.cpp
@@ -527,11 +527,11 @@ void Window::_update_window_size() {
size.x = MAX(size_limit.x, size.x);
size.y = MAX(size_limit.y, size.y);
- if (max_size.x > 0 && max_size.x > min_size.x && max_size.x > size.x) {
+ if (max_size.x > 0 && max_size.x > min_size.x && size.x > max_size.x) {
size.x = max_size.x;
}
- if (max_size.y > 0 && max_size.y > min_size.y && max_size.y > size.y) {
+ if (max_size.y > 0 && max_size.y > min_size.y && size.y > max_size.y) {
size.y = max_size.y;
}