1
0
Fork 0
mirror of https://github.com/AquariaOSE/Aquaria.git synced 2024-11-29 03:33:48 +00:00

Be less spammy when loading textures

Oonly print "FROM DISK" when it was really from disk, and not retrieved from cache
This commit is contained in:
fgenesis 2016-03-15 03:38:01 +01:00
parent 65e2bd83b2
commit e661743775

View file

@ -4453,7 +4453,13 @@ CountedPtr<Texture> Core::doTextureAdd(const std::string &texture, const std::st
t = new Texture; t = new Texture;
t->name = internalTextureName; t->name = internalTextureName;
if(!t->load(loadName)) if(t->load(loadName))
{
std::ostringstream os;
os << "LOADED TEXTURE FROM DISK: [" << internalTextureName << "] idx: " << resources.size()-1;
debugLog(os.str());
}
else
{ {
t->width = 64; t->width = 64;
t->height = 64; t->height = 64;
@ -4497,13 +4503,7 @@ CountedPtr<Texture> Core::addTexture(const std::string &textureName)
if(debugLogTextures) if(debugLogTextures)
{ {
if (ptex) if(!ptex || ptex->getLoadResult() != TEX_SUCCESS)
{
std::ostringstream os;
os << "LOADED TEXTURE FROM DISK: [" << internalTextureName << "] idx: " << resources.size()-1;
debugLog(os.str());
}
else if(ptex->getLoadResult() != TEX_SUCCESS)
{ {
std::ostringstream os; std::ostringstream os;
os << "FAILED TO LOAD TEXTURE: [" << internalTextureName << "] idx: " << resources.size()-1; os << "FAILED TO LOAD TEXTURE: [" << internalTextureName << "] idx: " << resources.size()-1;