diff options
author | Zach Hilman <zachhilman@gmail.com> | 2018-09-24 03:50:16 +0200 |
---|---|---|
committer | Zach Hilman <zachhilman@gmail.com> | 2018-09-24 03:50:20 +0200 |
commit | b3c2ec362bbbdd89da9c0aa84b425717f5e3d351 (patch) | |
tree | d3f4e621532f1f280f94bac4e6d071707aabbd35 /src/core/file_sys/romfs.cpp | |
parent | qt: Add UI elements for LayeredFS and related tools (diff) | |
download | yuzu-b3c2ec362bbbdd89da9c0aa84b425717f5e3d351.tar yuzu-b3c2ec362bbbdd89da9c0aa84b425717f5e3d351.tar.gz yuzu-b3c2ec362bbbdd89da9c0aa84b425717f5e3d351.tar.bz2 yuzu-b3c2ec362bbbdd89da9c0aa84b425717f5e3d351.tar.lz yuzu-b3c2ec362bbbdd89da9c0aa84b425717f5e3d351.tar.xz yuzu-b3c2ec362bbbdd89da9c0aa84b425717f5e3d351.tar.zst yuzu-b3c2ec362bbbdd89da9c0aa84b425717f5e3d351.zip |
Diffstat (limited to '')
-rw-r--r-- | src/core/file_sys/romfs.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/core/file_sys/romfs.cpp b/src/core/file_sys/romfs.cpp index 71e4e0e2f..205284a4d 100644 --- a/src/core/file_sys/romfs.cpp +++ b/src/core/file_sys/romfs.cpp @@ -4,7 +4,7 @@ #include "common/common_types.h" #include "common/swap.h" -#include "core/file_sys/fsmitm_romfsbuild.hpp" +#include "core/file_sys/fsmitm_romfsbuild.h" #include "core/file_sys/romfs.h" #include "core/file_sys/vfs.h" #include "core/file_sys/vfs_concat.h" @@ -100,7 +100,7 @@ void ProcessDirectory(VirtualFile file, std::size_t dir_offset, std::size_t file } } -VirtualDir ExtractRomFS(VirtualFile file, bool traverse_into_data) { +VirtualDir ExtractRomFS(VirtualFile file, RomFSExtractionType type) { RomFSHeader header{}; if (file->ReadObject(&header) != sizeof(RomFSHeader)) return nullptr; @@ -119,8 +119,9 @@ VirtualDir ExtractRomFS(VirtualFile file, bool traverse_into_data) { VirtualDir out = std::move(root); - while (out->GetSubdirectories().size() == 1 && out->GetFiles().size() == 0) { - if (out->GetSubdirectories().front()->GetName() == "data" && !traverse_into_data) + while (out->GetSubdirectories().size() == 1 && out->GetFiles().empty()) { + if (out->GetSubdirectories().front()->GetName() == "data" && + type == RomFSExtractionType::Truncated) break; out = out->GetSubdirectories().front(); } |