From cdd912c48eab15f581459afc2cda8fdcfabf92db Mon Sep 17 00:00:00 2001 From: Anilforextra Date: Sat, 25 Sep 2021 14:46:45 +0545 Subject: Construct values only when necessary. --- servers/rendering/renderer_rd/renderer_compositor_rd.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'servers/rendering/renderer_rd/renderer_compositor_rd.cpp') diff --git a/servers/rendering/renderer_rd/renderer_compositor_rd.cpp b/servers/rendering/renderer_rd/renderer_compositor_rd.cpp index c53c202bab..559e6d5ad7 100644 --- a/servers/rendering/renderer_rd/renderer_compositor_rd.cpp +++ b/servers/rendering/renderer_rd/renderer_compositor_rd.cpp @@ -197,7 +197,7 @@ void RendererCompositorRD::set_boot_image(const Ref &p_image, const Color } } else { screenrect = imgrect; - screenrect.position += ((Size2(window_size.width, window_size.height) - screenrect.size) / 2.0).floor(); + screenrect.position += ((window_size - screenrect.size) / 2.0).floor(); } screenrect.position /= window_size; -- cgit v1.2.3