library: Fixes to RichText module

This commit is contained in:
Antonio Niño Díaz 2024-08-14 00:45:07 +01:00
parent 4115a62800
commit de16a59722

View File

@ -324,6 +324,8 @@ int NE_RichTextBitmapSet(u32 slot, const void *texture_buffer,
free(info->palette_buffer); free(info->palette_buffer);
} }
info->has_to_free_buffers = false;
info->texture_buffer = (void *)texture_buffer; info->texture_buffer = (void *)texture_buffer;
info->texture_width = texture_width; info->texture_width = texture_width;
info->texture_height = texture_height; info->texture_height = texture_height;
@ -414,7 +416,7 @@ int NE_RichTextRenderMaterial(u32 slot, const char *str, NE_Material **mat,
if (!info->active) if (!info->active)
return 0; return 0;
void *out_texture; void *out_texture = NULL;
size_t out_width, out_height; size_t out_width, out_height;
dsf_error err = DSF_StringRenderToTexture(info->handle, dsf_error err = DSF_StringRenderToTexture(info->handle,
str, info->fmt, info->texture_buffer, str, info->fmt, info->texture_buffer,