diff options
author | Hugo Locurcio <hugo.locurcio@hugo.pro> | 2019-01-31 19:49:10 +0100 |
---|---|---|
committer | Hugo Locurcio <hugo.locurcio@hugo.pro> | 2019-01-31 19:49:10 +0100 |
commit | 355d65aa8d66b33c85c08d60e3d85ff44235ba3c (patch) | |
tree | 36fe8072d4bd4c9a997b4e497bc0db920eae6f67 /scene/main | |
parent | 463123a661151f119132f2ee9af78925a58a068a (diff) |
Fix a font oversampling warning being printed when it shouldn't
Diffstat (limited to 'scene/main')
-rw-r--r-- | scene/main/scene_tree.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/scene/main/scene_tree.cpp b/scene/main/scene_tree.cpp index f713851090..689f18a09d 100644 --- a/scene/main/scene_tree.cpp +++ b/scene/main/scene_tree.cpp @@ -1154,13 +1154,14 @@ void SceneTree::_update_root_rect() { float viewport_aspect = desired_res.aspect(); float video_mode_aspect = video_mode.aspect(); + if (use_font_oversampling && stretch_aspect == STRETCH_ASPECT_IGNORE) { + WARN_PRINT("Font oversampling only works with the resize modes 'Keep Width', 'Keep Height', and 'Expand'."); + } + if (stretch_aspect == STRETCH_ASPECT_IGNORE || ABS(viewport_aspect - video_mode_aspect) < CMP_EPSILON) { //same aspect or ignore aspect viewport_size = desired_res; screen_size = video_mode; - if (use_font_oversampling) { - WARN_PRINT("Font oversampling only works with the following resize modes 'Keep Width', 'Keep Height', and 'Expand'.") - } } else if (viewport_aspect < video_mode_aspect) { // screen ratio is smaller vertically |