src/text.c

changeset 256
60014484121c
parent 255
0e0a0bf4f7e4
--- a/src/text.c	Tue Aug 05 20:38:11 2025 +0200
+++ b/src/text.c	Wed Aug 06 00:37:01 2025 +0200
@@ -74,7 +74,7 @@
     TTF_SetFontWrapAlignment(
             font, alignments[text->base.flags & ASC_TEXT_ALIGNMENT_MASK]);
     SDL_Surface *surface = TTF_RenderText_Blended_Wrapped(
-            font, text->text.ptr, text->text.length, asc_col_sdl(text->color), text->max_width
+            font, text->text.ptr, text->text.length, asc_color_sdl(text->color), text->max_width
     );
     if (surface == NULL) {
         asc_error("Rendering TTF surface failed: %s", SDL_GetError());
@@ -150,8 +150,8 @@
     if (text->font.size == 0) {
         text->font.size = 12;
     }
-    if (asc_memcmpz(&args.color, sizeof(asc_col4i))) {
-        text->color = ASC_RGB(255, 255, 255);
+    if (asc_memcmpz(&args.color, sizeof(asc_color))) {
+        text->color = ASC_RGB(1, 1, 1);
     } else {
         text->color = args.color;
     }

mercurial