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

@@ -65,7 +65,14 @@ void NodePanelBrush::init()
if (str_iequals(ext, "abr"))
{
ABR abr;
abr.open(path);
LOG("ABR detected");
if (!abr.open(path))
{
LOG("ABR read failed");
return;
}
for (const auto& samp : abr.m_samples)
{
std::string path_high = App::I.data_path + "/brushes/" + samp.first + ".png";
@@ -101,8 +108,13 @@ void NodePanelBrush::init()
for (const auto& pr : brushes)
{
auto presets = App::I.stroke->m_presets_popup;
async_start();
if (pr->load())
{
LOG("add preset %s", pr->m_name.c_str());
presets->add_brush(pr);
}
async_end();
}
//save();
}