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