diff --git a/src/nostalgia/studio/lib/project.cpp b/src/nostalgia/studio/lib/project.cpp index 85099434..9db356b6 100644 --- a/src/nostalgia/studio/lib/project.cpp +++ b/src/nostalgia/studio/lib/project.cpp @@ -76,7 +76,7 @@ int Project::write(QString path, uint8_t *buff, size_t buffLen) const { } ox::FileStat Project::stat(QString path) const { - return m_fs.stat(path.toUtf8().data()); + return m_fs.stat(path.toUtf8().data()).value; } } diff --git a/src/nostalgia/tools/lib/tilesetimport.cpp b/src/nostalgia/tools/lib/tilesetimport.cpp index f6b8ba95..c53c4004 100644 --- a/src/nostalgia/tools/lib/tilesetimport.cpp +++ b/src/nostalgia/tools/lib/tilesetimport.cpp @@ -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());