diff options
author | dec05eba <dec05eba@protonmail.com> | 2024-09-10 22:26:47 +0200 |
---|---|---|
committer | dec05eba <dec05eba@protonmail.com> | 2024-09-10 22:26:47 +0200 |
commit | d20a42bc640e4cd4c3bb2a15c08660319a21dcc5 (patch) | |
tree | ad0365bbd12d10516b61bac9e07f80eef60cf82d /src | |
parent | 0b1ec6b28231f874590fe4df52aacffdca0974ac (diff) |
Better mgl_text_set_max_width
Diffstat (limited to 'src')
-rw-r--r-- | src/graphics/text.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/graphics/text.c b/src/graphics/text.c index 9fa52f6..e17dd5a 100644 --- a/src/graphics/text.c +++ b/src/graphics/text.c @@ -152,8 +152,9 @@ void mgl_text_set_color(mgl_text *self, mgl_color color) { } void mgl_text_set_max_width(mgl_text *self, float max_width) { - if(float_abs(max_width - self->max_width) > 0.01) - self->bounds_dirty = true; + if(float_abs(max_width - self->max_width) < 0.01) + return; + self->bounds_dirty = true; self->max_width = max_width; } |