From 90226ec438858750e1745da5f5e809cddf0a59f3 Mon Sep 17 00:00:00 2001 From: Michael Scire Date: Thu, 28 Jun 2018 23:18:35 -0600 Subject: [PATCH] fs.mitm: Fix typo. map impl takes 2-3 seconds to boot botw. --- stratosphere/fs_mitm/source/fsmitm_romfsbuild.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/stratosphere/fs_mitm/source/fsmitm_romfsbuild.cpp b/stratosphere/fs_mitm/source/fsmitm_romfsbuild.cpp index c5d1d1f90..e493994e8 100644 --- a/stratosphere/fs_mitm/source/fsmitm_romfsbuild.cpp +++ b/stratosphere/fs_mitm/source/fsmitm_romfsbuild.cpp @@ -288,6 +288,7 @@ void RomFSBuildContext::Build(std::vector *out_infos) { entry_offset = 0; for (const auto &it : this->directories) { cur_dir = it.second; + cur_dir->entry_offset = entry_offset; entry_offset += sizeof(RomFSDirectoryEntry) + ((cur_dir->path_len - cur_dir->cur_path_ofs + 3) & ~3); /* Assign deferred parent/sibling ownership. */ @@ -387,7 +388,7 @@ void RomFSBuildContext::Build(std::vector *out_infos) { header->file_table_ofs = header->file_hash_table_ofs + header->file_hash_table_size; /* For debugging, uncomment this to get a log of the generated metadata tables. */ - /* + { FsFileSystem sd_fs; if (R_SUCCEEDED(fsMountSdcard(&sd_fs))) { @@ -402,7 +403,7 @@ void RomFSBuildContext::Build(std::vector *out_infos) { fsFsClose(&sd_fs); } } - */ + out_infos->emplace_back(header->dir_hash_table_ofs, this->dir_hash_table_size + this->dir_table_size + this->file_hash_table_size + this->file_table_size, metadata, RomFSDataSource::Memory); }