Fix wrong viewport scaling at intermediate resolutions

Fixes viewport scale being wrong at resolutions that are not
integer multiples of content_scale_factor.

This is done by allowing size_2d_override to be Size2 instead of
Size2i. This change is not propagated to the exposed SubViewport
to keep compatibility for now.
This commit is contained in:
KerekesDavid
2025-02-12 01:18:58 +01:00
parent ad9abe841d
commit 315cc5e437
3 changed files with 12 additions and 9 deletions

View File

@@ -1133,7 +1133,7 @@ void Window::_update_viewport_size() {
//update the viewport part
Size2i final_size;
Size2i final_size_override;
Size2 final_size_override;
Rect2i attach_to_screen_rect(Point2i(), size);
double font_oversampling = 1.0;
window_transform = Transform2D();