From ee6052d4e727e5197fd6cf5fb55b0fa5102145af Mon Sep 17 00:00:00 2001 From: dec05eba Date: Fri, 9 Aug 2024 04:20:00 +0200 Subject: text always set dirty when setting string or font --- src/graphics/text.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/graphics/text.c b/src/graphics/text.c index 372def2..f84169a 100644 --- a/src/graphics/text.c +++ b/src/graphics/text.c @@ -106,14 +106,12 @@ void mgl_text_deinit(mgl_text *self) { void mgl_text_set_string(mgl_text *self, const char *str, size_t str_size) { self->text = str; self->text_size = str_size; - if(self->text && self->text_size > 0 && self->font) - self->bounds_dirty = true; + self->bounds_dirty = true; } void mgl_text_set_font(mgl_text *self, mgl_font *font) { self->font = font; - if(self->text && self->text_size > 0 && self->font) - self->bounds_dirty = true; + self->bounds_dirty = true; } void mgl_text_set_position(mgl_text *self, mgl_vec2f position) { -- cgit v1.2.3