Improve warning

This commit is contained in:
Benau
2017-01-06 20:54:22 +08:00
parent 437f89eea7
commit 555cdacd83
2 changed files with 4 additions and 4 deletions

View File

@@ -32,13 +32,14 @@ STKTexManager::~STKTexManager()
STKTexture* STKTexManager::findTextureInFileSystem(const std::string& filename,
std::string* full_path)
{
*full_path = file_manager->getFileSystem()->getAbsolutePath
(file_manager->searchTexture(filename).c_str()).c_str();
if (full_path->empty())
io::path relative_path = file_manager->searchTexture(filename).c_str();
if (relative_path.empty())
{
Log::warn("STKTexManager", "Failed to load %s.", filename.c_str());
return NULL;
}
*full_path =
file_manager->getFileSystem()->getAbsolutePath(relative_path).c_str();
for (auto p : m_all_textures)
{
if (p.second == NULL)

View File

@@ -31,7 +31,6 @@
#include "graphics/particle_emitter.hpp"
#include "graphics/particle_kind_manager.hpp"
#include "graphics/stk_mesh_scene_node.hpp"
#include "graphics/stk_texture.hpp"
#include "graphics/stk_tex_manager.hpp"
#include "graphics/render_info.hpp"
#include "io/file_manager.hpp"