Show SDL_Image error when loading a font fails.
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@2039 416bcca6-2ee7-4201-b75f-2eb2f807beb1
This commit is contained in:
parent
afc6ee8e4d
commit
7e164e6e84
@ -525,7 +525,11 @@ byte *Render_text_SFont(const char *str, int font_number, int *width, int *heigh
|
|||||||
font_surface=IMG_Load(Font_name(font_number));
|
font_surface=IMG_Load(Font_name(font_number));
|
||||||
if (!font_surface)
|
if (!font_surface)
|
||||||
{
|
{
|
||||||
Verbose_message("Warning","Error loading font.\nThe file may be corrupt.");
|
char buffer[256];
|
||||||
|
strcpy(buffer, "Error loading font.\n");
|
||||||
|
strcat(buffer,IMG_GetError());
|
||||||
|
Verbose_message("Warning",buffer);
|
||||||
|
// TODO this leaves a non-erased cursor when the window closes.
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
// Font is 24bit: Perform a color reduction
|
// Font is 24bit: Perform a color reduction
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user