Put a visible error message in case of SDL_Image fail.
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1587 416bcca6-2ee7-4201-b75f-2eb2f807beb1
This commit is contained in:
parent
0631f57399
commit
fef8aec302
@ -48,7 +48,6 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <SDL_image.h>
|
#include <SDL_image.h>
|
||||||
// SFont
|
|
||||||
#include "SFont.h"
|
#include "SFont.h"
|
||||||
|
|
||||||
#include "struct.h"
|
#include "struct.h"
|
||||||
@ -56,6 +55,7 @@
|
|||||||
#include "sdlscreen.h"
|
#include "sdlscreen.h"
|
||||||
#include "io.h"
|
#include "io.h"
|
||||||
#include "errors.h"
|
#include "errors.h"
|
||||||
|
#include "windows.h"
|
||||||
|
|
||||||
typedef struct T_Font
|
typedef struct T_Font
|
||||||
{
|
{
|
||||||
@ -461,7 +461,7 @@ byte *Render_text_SFont(const char *str, int font_number, int *width, int *heigh
|
|||||||
Surface_fonte=IMG_Load(Font_name(font_number));
|
Surface_fonte=IMG_Load(Font_name(font_number));
|
||||||
if (!Surface_fonte)
|
if (!Surface_fonte)
|
||||||
{
|
{
|
||||||
DEBUG("Font loading failed",0);
|
Warning_message("Error loading font. The file may be corrupt.");
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
font=SFont_InitFont(Surface_fonte);
|
font=SFont_InitFont(Surface_fonte);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user