Parcourir la source

Fix a dependance of rtexture to rtext (#4171)

pull/4175/head
Julianiolo il y a 8 mois
committed by GitHub
Parent
révision
aa70d32786
Aucune clé connue n'a été trouvée dans la base pour cette signature ID de la clé GPG: B5690EEEBB952194
1 fichiers modifiés avec 5 ajouts et 0 suppressions
  1. +5
    -0
      src/rtextures.c

+ 5
- 0
src/rtextures.c Voir le fichier

@ -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;
}

Chargement…
Annuler
Enregistrer