fix utf-16 reading and make it work on android
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user