Merge pull request #57390 from Pineapple/scene-tree-get-window-size

This commit is contained in:
Rémi Verschelde 2022-01-31 18:23:36 +01:00 committed by GitHub
commit b5eef640e1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 3 deletions

View File

@ -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()) {