mirror of
https://github.com/OpenMW/openmw.git
synced 2025-03-02 22:09:41 +00:00
Log when icon is missing and fallback is used
This commit is contained in:
parent
4d3df56bf3
commit
6291b9304b
1 changed files with 4 additions and 0 deletions
|
@ -5,6 +5,7 @@
|
||||||
#include <MyGUI_RenderManager.h>
|
#include <MyGUI_RenderManager.h>
|
||||||
#include <MyGUI_TextBox.h>
|
#include <MyGUI_TextBox.h>
|
||||||
|
|
||||||
|
#include <components/debug/debuglog.hpp>
|
||||||
// correctIconPath
|
// correctIconPath
|
||||||
#include <components/resource/resourcesystem.hpp>
|
#include <components/resource/resourcesystem.hpp>
|
||||||
#include <components/vfs/manager.hpp>
|
#include <components/vfs/manager.hpp>
|
||||||
|
@ -111,7 +112,10 @@ namespace MWGui
|
||||||
invIcon = "default icon.tga";
|
invIcon = "default icon.tga";
|
||||||
invIcon = MWBase::Environment::get().getWindowManager()->correctIconPath(invIcon);
|
invIcon = MWBase::Environment::get().getWindowManager()->correctIconPath(invIcon);
|
||||||
if (!MWBase::Environment::get().getResourceSystem()->getVFS()->exists(invIcon))
|
if (!MWBase::Environment::get().getResourceSystem()->getVFS()->exists(invIcon))
|
||||||
|
{
|
||||||
|
Log(Debug::Error) << "Failed to open image: '" << invIcon << "' not found, falling back to 'default-icon.tga'";
|
||||||
invIcon = MWBase::Environment::get().getWindowManager()->correctIconPath("default icon.tga");
|
invIcon = MWBase::Environment::get().getWindowManager()->correctIconPath("default icon.tga");
|
||||||
|
}
|
||||||
setIcon(invIcon);
|
setIcon(invIcon);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue