Merge pull request #60830 from Ansraer/fix-2d-scale

[4.x] Add viewport content scale
This commit is contained in:
Rémi Verschelde 2022-06-04 00:15:38 +02:00 committed by GitHub
commit 659f4b64d6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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;