fix utf-16 reading and make it work on android

This commit is contained in:
2019-02-10 20:55:26 +01:00
parent 1d6c26f2ba
commit 6e41263600
9 changed files with 95 additions and 26 deletions

View File

@@ -286,7 +286,11 @@ bool Brush::load()
{
m_tip_texture = std::make_shared<Texture2D>();
if (!m_tip_texture->load(m_brush_path))
{
LOG("failed to load %s", m_brush_path.c_str());
m_tip_texture = nullptr;
return false;
}
m_tip_texture->create_mipmaps();
m_tip_texture->auto_destroy = true;
}
@@ -294,7 +298,12 @@ bool Brush::load()
{
m_stencil_texture = std::make_shared<Texture2D>();
if (!m_stencil_texture->load(m_stencil_path))
{
LOG("failed to load %s", m_stencil_path.c_str());
m_tip_texture = nullptr;
m_stencil_texture = nullptr;
return false;
}
m_stencil_texture->create_mipmaps();
m_stencil_texture->auto_destroy = true;
}