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

@@ -41,7 +41,10 @@ bool Image::load_file(std::string filename)
bool Image::save(const std::string& path)
{
return stbi_write_png(path.c_str(), width, height, comp, data(), 0);
bool ret = stbi_write_png(path.c_str(), width, height, comp, data(), 0);
if (!ret)
LOG("failed Image::save %s", path.c_str());
return ret;
}
void Image::flip()