From 708089f5602c5134d641a8f16850f31b8fb2798d Mon Sep 17 00:00:00 2001 From: Ray Date: Wed, 23 Oct 2024 23:29:05 +0200 Subject: [PATCH] Reviewed and reverted unneeded module check, `rtextures` should not depend on `rtext` --- src/rtextures.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/src/rtextures.c b/src/rtextures.c index a4534a7a..23b32c1b 100644 --- a/src/rtextures.c +++ b/src/rtextures.c @@ -1111,8 +1111,7 @@ Image GenImageText(int width, int height, const char *text) { Image image = { 0 }; -#if defined(SUPPORT_MODULE_RTEXT) - int textLength = TextLength(text); + int textLength = (int)strlen(text); int imageViewSize = width*height; image.width = width; @@ -1122,10 +1121,6 @@ Image GenImageText(int width, int height, const char *text) image.mipmaps = 1; memcpy(image.data, text, (textLength > imageViewSize)? imageViewSize : textLength); -#else - TRACELOG(LOG_WARNING, "IMAGE: GenImageText() requires module: rtext"); - image = GenImageColor(width, height, BLACK); // Generating placeholder black image rectangle -#endif return image; }