1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-04 12:00:25 +00:00

Construct values only when necessary.

This commit is contained in:
Anilforextra
2021-09-25 14:46:45 +05:45
parent 5e4a71200e
commit cdd912c48e
10 changed files with 20 additions and 28 deletions

View File

@@ -197,7 +197,7 @@ void RendererCompositorRD::set_boot_image(const Ref<Image> &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;