mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 01:58:19 +00:00
Improve error log messages for PNG loading
This commit is contained in:
parent
0427dfff2e
commit
82b75ddfe0
|
@ -2,6 +2,7 @@
|
|||
/* If you are missing that file, acquire a complete release at teeworlds.com. */
|
||||
|
||||
#include <base/detect.h>
|
||||
#include <base/log.h>
|
||||
#include <base/math.h>
|
||||
|
||||
#if defined(CONF_FAMILY_UNIX)
|
||||
|
@ -583,6 +584,7 @@ bool CGraphics_Threaded::LoadPNG(CImageInfo *pImg, const char *pFilename, int St
|
|||
else
|
||||
{
|
||||
free(pImgBuffer);
|
||||
log_error("game/png", "image had unsupported image format. filename='%s' format='%d'", pFilename, (int)ImageFormat);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -612,13 +614,13 @@ bool CGraphics_Threaded::LoadPNG(CImageInfo *pImg, const char *pFilename, int St
|
|||
}
|
||||
else
|
||||
{
|
||||
dbg_msg("game/png", "image had unsupported image format. filename='%s'", pFilename);
|
||||
log_error("game/png", "failed to load file. filename='%s'", pFilename);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
dbg_msg("game/png", "failed to open file. filename='%s'", pFilename);
|
||||
log_error("game/png", "failed to open file. filename='%s'", pFilename);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue