From aa70d32786f0260d7a6b37e47f14f922366a0d31 Mon Sep 17 00:00:00 2001 From: Julianiolo <50519317+Julianiolo@users.noreply.github.com> Date: Sat, 20 Jul 2024 10:39:14 +0200 Subject: [PATCH] Fix a dependance of rtexture to rtext (#4171) --- src/rtextures.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/rtextures.c b/src/rtextures.c index 1e88b64a4..dc364d762 100644 --- a/src/rtextures.c +++ b/src/rtextures.c @@ -1213,6 +1213,7 @@ Image GenImageText(int width, int height, const char *text) { Image image = { 0 }; +#ifdef SUPPORT_MODULE_RTEXT int textLength = TextLength(text); int imageViewSize = width*height; @@ -1223,6 +1224,10 @@ 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; }