mirror of https://github.com/AxioDL/nod.git
GCN image generation fixes
This commit is contained in:
parent
fafff92874
commit
3fab04ff1a
|
@ -93,7 +93,10 @@ int main(int argc, char* argv[])
|
|||
lastIdx = idx;
|
||||
printf("\n");
|
||||
}
|
||||
if (bytes != -1)
|
||||
printf("\r%s %" PRISize " B", name.c_str(), bytes);
|
||||
else
|
||||
printf("\r%s", name.c_str());
|
||||
fflush(stdout);
|
||||
};
|
||||
|
||||
|
|
|
@ -167,7 +167,7 @@ void DiscBuilderBase::IPartitionBuilder::recursiveBuildNodes(const SystemChar* d
|
|||
if (e.m_isDir)
|
||||
{
|
||||
size_t dirNodeIdx = m_buildNodes.size();
|
||||
m_buildNodes.emplace_back(true, m_buildNameOff, 0, 1);
|
||||
m_buildNodes.emplace_back(true, m_buildNameOff, 0, dirNodeIdx+1);
|
||||
addBuildName(e.m_name);
|
||||
incParents();
|
||||
recursiveBuildNodes(e.m_path.c_str(), dolInode, [&](){m_buildNodes[dirNodeIdx].incrementLength(); incParents();});
|
||||
|
@ -213,6 +213,8 @@ bool DiscBuilderBase::IPartitionBuilder::buildFromDirectory(const SystemChar* di
|
|||
|
||||
/* Clear file */
|
||||
m_parent.getFileIO().beginWriteStream();
|
||||
++m_parent.m_progressIdx;
|
||||
m_parent.m_progressCB(m_parent.m_progressIdx, "Preparing output image", -1);
|
||||
|
||||
m_buildNodes.emplace_back(true, m_buildNameOff, 0, 1);
|
||||
addBuildName(_S("<root>"));
|
||||
|
|
|
@ -165,6 +165,7 @@ public:
|
|||
size_t fstSz = sizeof(FSTNode) * m_buildNodes.size();
|
||||
for (size_t i=0 ; i<fstOff-xferSz ; ++i)
|
||||
ws->write("\xff", 1);
|
||||
fstOff += 0x2440;
|
||||
ws->write(m_buildNodes.data(), fstSz);
|
||||
for (const std::string& str : m_buildNames)
|
||||
ws->write(str.data(), str.size()+1);
|
||||
|
|
Loading…
Reference in New Issue