If loading an image using "IMG_Load()" fails, the name of the file is
now also displayed with the error message.
This already worked in the past, but was broken since commit
a2698b3b.
if ((surface = IMG_Load(filename)) == NULL)
{
if ((surface = IMG_Load(filename)) == NULL)
{
- Error(ERR_WARN, "IMG_Load() failed: %s", SDL_GetError());
+ Error(ERR_WARN, "IMG_Load('%s') failed: %s", basename, SDL_GetError());
// load image to temporary surface
if ((sdl_image_tmp = IMG_Load(filename)) == NULL)
// load image to temporary surface
if ((sdl_image_tmp = IMG_Load(filename)) == NULL)
- Error(ERR_EXIT, "IMG_Load() failed: %s", SDL_GetError());
+ Error(ERR_EXIT, "IMG_Load('%s') failed: %s", getBaseNamePtr(filename),
+ SDL_GetError());
print_timestamp_time("IMG_Load");
print_timestamp_time("IMG_Load");