Skip to content

Commit

Permalink
Merge pull request #57390 from Pineapple/scene-tree-get-window-size
Browse files Browse the repository at this point in the history
  • Loading branch information
akien-mga authored Jan 31, 2022
2 parents 0c6391a + 94ddd41 commit b5eef64
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions scene/main/scene_tree.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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()) {
Expand Down

0 comments on commit b5eef64

Please sign in to comment.