From 479358755b2291ead52337c9d63efdeeb4093a0a Mon Sep 17 00:00:00 2001 From: cutealien Date: Fri, 11 Jun 2021 15:32:24 +0000 Subject: [PATCH] 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 --- changes.txt | 1 + source/Irrlicht/CNullDriver.cpp | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/changes.txt b/changes.txt index bf0286f1..5d2c49d6 100644 --- a/changes.txt +++ b/changes.txt @@ -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. diff --git a/source/Irrlicht/CNullDriver.cpp b/source/Irrlicht/CNullDriver.cpp index 2164286a..0b95bce7 100644 --- a/source/Irrlicht/CNullDriver.cpp +++ b/source/Irrlicht/CNullDriver.cpp @@ -1599,7 +1599,9 @@ core::array 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);