From 94ddd4168d691e09239902d4d42eea29925e6bac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bart=C5=82omiej=20T=2E=20Listwon?= Date: Fri, 28 Jan 2022 23:02:48 +0100 Subject: [PATCH] Simplify usage of OS::get_window_size() in SceneTree methods --- scene/main/scene_tree.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scene/main/scene_tree.cpp b/scene/main/scene_tree.cpp index e79e787c206..c6cd2c17f53 100644 --- a/scene/main/scene_tree.cpp +++ b/scene/main/scene_tree.cpp @@ -536,7 +536,7 @@ bool SceneTree::idle(float p_time) { _notify_group_pause("idle_process_internal", Node::NOTIFICATION_INTERNAL_PROCESS); _notify_group_pause("idle_process", Node::NOTIFICATION_PROCESS); - Size2 win_size = Size2(OS::get_singleton()->get_window_size().width, OS::get_singleton()->get_window_size().height); + Size2 win_size = OS::get_singleton()->get_window_size(); if (win_size != last_screen_size) { last_screen_size = win_size; @@ -1135,7 +1135,7 @@ void SceneTree::_update_root_rect() { } //actual screen video mode - Size2 video_mode = Size2(OS::get_singleton()->get_window_size().width, OS::get_singleton()->get_window_size().height); + Size2 video_mode = OS::get_singleton()->get_window_size(); Size2 desired_res = stretch_min; Size2 viewport_size; @@ -2128,7 +2128,7 @@ SceneTree::SceneTree() { stretch_aspect = STRETCH_ASPECT_IGNORE; stretch_scale = 1.0; - last_screen_size = Size2(OS::get_singleton()->get_window_size().width, OS::get_singleton()->get_window_size().height); + last_screen_size = OS::get_singleton()->get_window_size(); _update_root_rect(); if (ScriptDebugger::get_singleton()) {