diff options
| author | Ruslan Mustakov | 2018-03-19 20:44:26 +0700 |
|---|---|---|
| committer | Ruslan Mustakov | 2018-03-19 20:44:26 +0700 |
| commit | 47747718d63c1e5d3949fa4793752b579434bc3e (patch) | |
| tree | d541d2e3f9028f16500721367c54d4268b5af56e | |
| parent | ebce36c22f1aa27e3ef449565bf1e35c19a3e830 (diff) | |
| download | godot-47747718d63c1e5d3949fa4793752b579434bc3e.tar.gz godot-47747718d63c1e5d3949fa4793752b579434bc3e.tar.zst godot-47747718d63c1e5d3949fa4793752b579434bc3e.zip | |
Fix oversampled font artifacts after resize
Font update after resize relies on the viewport size which was updated
after the font was already refreshed, which resulted in artifacts when
it was rendered into the actual/new viewport size.
Fixes #15173.
| -rw-r--r-- | scene/main/scene_tree.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/scene/main/scene_tree.cpp b/scene/main/scene_tree.cpp index 12c3da78b..037331dec 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"); } |
