No longer try loading broken image files twice with same image loader

This is mainly about getting rid of double error messages for same file.


git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@6221 dfc29bdd-3216-0410-991c-e03cc46cb475
This commit is contained in:
cutealien 2021-06-11 15:32:24 +00:00
parent e7143ef977
commit 479358755b
2 changed files with 4 additions and 1 deletions

View File

@ -1,5 +1,6 @@
--------------------------
Changes in 1.9 (not yet released)
- Don't try loading broken image files twice with same loader anymore.
- Make CImageLoaderJPG thread safe. Thanks @ Edoardo Lolletti for report and patch (patch #324)
- Add ETCF_SUPPORT_VERTEXT_TEXTURE flag which can be used to enable vertex texture sampling support in Direct3D 9.
Note that this was enabled for a long time in 1.9 svn, but is now disabled by default.

View File

@ -1599,7 +1599,9 @@ core::array<IImage*> CNullDriver::createImagesFromFile(io::IReadFile* file, E_TE
{
// dito
file->seek(0);
if (SurfaceLoader[i]->isALoadableFileFormat(file))
if (SurfaceLoader[i]->isALoadableFileFormat(file)
&& !SurfaceLoader[i]->isALoadableFileExtension(file->getFileName()) // extension was tried above already
)
{
file->seek(0);
imageArray = SurfaceLoader[i]->loadImages(file, type);