use errorcode 3 for ttf
This commit is contained in:
parent
51b2200ddc
commit
5ec256d701
1 changed files with 4 additions and 4 deletions
|
@ -46,7 +46,7 @@ static void init(void) {
|
||||||
|
|
||||||
if (TTF_Init() == -1) {
|
if (TTF_Init() == -1) {
|
||||||
fprintf(stderr, "Erreur TTF : %s\n", TTF_GetError());
|
fprintf(stderr, "Erreur TTF : %s\n", TTF_GetError());
|
||||||
exit(2);
|
exit(3);
|
||||||
}
|
}
|
||||||
|
|
||||||
glGenTextures(1, &_textTexId);
|
glGenTextures(1, &_textTexId);
|
||||||
|
@ -55,13 +55,13 @@ static void init(void) {
|
||||||
|
|
||||||
if (!(font = TTF_OpenFont(fontName, 100))) {
|
if (!(font = TTF_OpenFont(fontName, 100))) {
|
||||||
fprintf(stderr, "Erreur TTF : %s\n", TTF_GetError());
|
fprintf(stderr, "Erreur TTF : %s\n", TTF_GetError());
|
||||||
exit(2);
|
exit(3);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((d = TTF_RenderUTF8_Blended_Wrapped(font, text, c, 0)) == NULL) {
|
if ((d = TTF_RenderUTF8_Blended_Wrapped(font, text, c, 0)) == NULL) {
|
||||||
TTF_CloseFont(font);
|
TTF_CloseFont(font);
|
||||||
fprintf(stderr, "Erreur TTF : RenderText\n");
|
fprintf(stderr, "Erreur TTF : TTF_RenderUTF8_Blended_Wrapped\n");
|
||||||
exit(2);
|
exit(3);
|
||||||
}
|
}
|
||||||
|
|
||||||
assert((s = SDL_CreateRGBSurface(0, d->w, d->h, 32, R_MASK, G_MASK, B_MASK,
|
assert((s = SDL_CreateRGBSurface(0, d->w, d->h, 32, R_MASK, G_MASK, B_MASK,
|
||||||
|
|
Reference in a new issue