diff options
author | Ansraer <jacky2611@gmail.com> | 2022-05-06 19:50:53 +0200 |
---|---|---|
committer | Ansraer <jacky2611@gmail.com> | 2022-05-06 19:50:53 +0200 |
commit | 045f511bd9d91de93bac6c7e8a18f901805cb96b (patch) | |
tree | 0f75b035828e618cd052cf75e2ad152650dc51c8 | |
parent | bb73dafe377471abcd6661a54e8bf0a2091ac4f2 (diff) |
Add viewport content scale
-rw-r--r-- | scene/main/window.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/scene/main/window.cpp b/scene/main/window.cpp index 6feccb7eec..08500a4629 100644 --- a/scene/main/window.cpp +++ b/scene/main/window.cpp @@ -681,7 +681,7 @@ void Window::_update_viewport_size() { } break; case CONTENT_SCALE_MODE_VIEWPORT: { - final_size = viewport_size; + final_size = (viewport_size / content_scale_factor).floor(); attach_to_screen_rect = Rect2(margin, screen_size); } break; |