use errorcode 3 for ttf

This commit is contained in:
Mylloon 2023-05-03 18:21:00 +02:00
parent 51b2200ddc
commit 5ec256d701
Signed by: Anri
GPG key ID: A82D63DFF8D1317F

View file

@ -46,7 +46,7 @@ static void init(void) {
if (TTF_Init() == -1) {
fprintf(stderr, "Erreur TTF : %s\n", TTF_GetError());
exit(2);
exit(3);
}
glGenTextures(1, &_textTexId);
@ -55,13 +55,13 @@ static void init(void) {
if (!(font = TTF_OpenFont(fontName, 100))) {
fprintf(stderr, "Erreur TTF : %s\n", TTF_GetError());
exit(2);
exit(3);
}
if ((d = TTF_RenderUTF8_Blended_Wrapped(font, text, c, 0)) == NULL) {
TTF_CloseFont(font);
fprintf(stderr, "Erreur TTF : RenderText\n");
exit(2);
fprintf(stderr, "Erreur TTF : TTF_RenderUTF8_Blended_Wrapped\n");
exit(3);
}
assert((s = SDL_CreateRGBSurface(0, d->w, d->h, 32, R_MASK, G_MASK, B_MASK,