summaryrefslogtreecommitdiff
path: root/scene
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <rverschelde@gmail.com>2018-03-20 11:12:28 +0100
committerGitHub <noreply@github.com>2018-03-20 11:12:28 +0100
commite751fef20620334ac4ae74a6a2ffd66cd97060ab (patch)
tree47bbf4303073770ae90f71ff2c0a678f8876a811 /scene
parentbb5e5fca43309ce8217a0628dcbe51c4e19af97f (diff)
parent47747718d63c1e5d3949fa4793752b579434bc3e (diff)
Merge pull request #17632 from endragor/fix-resize-font-update
Fix oversampled font artifacts after resize
Diffstat (limited to 'scene')
-rw-r--r--scene/main/scene_tree.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/scene/main/scene_tree.cpp b/scene/main/scene_tree.cpp
index 12c3da78bd..037331dec1 100644
--- a/scene/main/scene_tree.cpp
+++ b/scene/main/scene_tree.cpp
@@ -498,14 +498,14 @@ bool SceneTree::idle(float p_time) {
Size2 win_size = Size2(OS::get_singleton()->get_video_mode().width, OS::get_singleton()->get_video_mode().height);
if (win_size != last_screen_size) {
+ last_screen_size = win_size;
+ _update_root_rect();
+
if (use_font_oversampling) {
DynamicFontAtSize::font_oversampling = OS::get_singleton()->get_window_size().width / root->get_visible_rect().size.width;
DynamicFont::update_oversampling();
}
- last_screen_size = win_size;
- _update_root_rect();
-
emit_signal("screen_resized");
}