mirror of
https://github.com/raysan5/raylib.git
synced 2026-01-31 19:29:18 -05:00
Reviewed and reverted unneeded module check, rtextures should not depend on rtext
This commit is contained in:
@ -1111,8 +1111,7 @@ Image GenImageText(int width, int height, const char *text)
|
|||||||
{
|
{
|
||||||
Image image = { 0 };
|
Image image = { 0 };
|
||||||
|
|
||||||
#if defined(SUPPORT_MODULE_RTEXT)
|
int textLength = (int)strlen(text);
|
||||||
int textLength = TextLength(text);
|
|
||||||
int imageViewSize = width*height;
|
int imageViewSize = width*height;
|
||||||
|
|
||||||
image.width = width;
|
image.width = width;
|
||||||
@ -1122,10 +1121,6 @@ Image GenImageText(int width, int height, const char *text)
|
|||||||
image.mipmaps = 1;
|
image.mipmaps = 1;
|
||||||
|
|
||||||
memcpy(image.data, text, (textLength > imageViewSize)? imageViewSize : textLength);
|
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;
|
return image;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user