mirror of
https://github.com/luanti-org/luanti.git
synced 2025-06-27 16:36:03 +00:00
Print filenames in irrlicht png warnings (#14525)
Makes warnings like this more informative: `WARNING[Main]: Irrlicht: PNG warning: iCCP: known incorrect sRGB profile`
This commit is contained in:
parent
7e4462e0ac
commit
1d673ce075
5 changed files with 25 additions and 8 deletions
|
@ -983,6 +983,11 @@ IImage *CNullDriver::createImageFromFile(io::IReadFile *file)
|
|||
continue;
|
||||
|
||||
file->seek(0); // reset file position which might have changed due to previous loadImage calls
|
||||
// avoid warnings if extension is wrong
|
||||
if (!SurfaceLoader[i]->isALoadableFileFormat(file))
|
||||
continue;
|
||||
|
||||
file->seek(0);
|
||||
if (IImage *image = SurfaceLoader[i]->loadImage(file))
|
||||
return image;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue