[nostalgia] Fix for explicit ValErr::operator T

This commit is contained in:
2019-07-30 23:08:40 -05:00
parent c27cc56e31
commit df8e1d31d6
2 changed files with 4 additions and 2 deletions

View File

@@ -110,7 +110,9 @@ using namespace nostalgia::common;
}
ox::Error importTileSet(ox::FileSystem *fs, QString romPath, QString importPath) {
const auto bpp = countColors(importPath) > 16 ? 8 : 4;
int colors = 0;
oxReturnError(countColors(importPath).get(&colors));
const auto bpp = colors > 16 ? 8 : 4;
auto [imgDataBuff, err] = convertImg(importPath, bpp);
oxReturnError(err);
return fs->write(romPath.toUtf8().data(), imgDataBuff.data(), imgDataBuff.size());