diff options
author | Liam <byteslice@airmail.cc> | 2023-08-11 03:34:43 +0200 |
---|---|---|
committer | Liam <byteslice@airmail.cc> | 2023-08-15 23:47:25 +0200 |
commit | 86f6b6b7b2d930e8203114332b04a5c49a780b06 (patch) | |
tree | bf7ff58b0a36051d3c3489a40999d80357c570d0 /src/core/file_sys/romfs_factory.cpp | |
parent | Merge pull request #11287 from liamwhite/replaced-bytes (diff) | |
download | yuzu-86f6b6b7b2d930e8203114332b04a5c49a780b06.tar yuzu-86f6b6b7b2d930e8203114332b04a5c49a780b06.tar.gz yuzu-86f6b6b7b2d930e8203114332b04a5c49a780b06.tar.bz2 yuzu-86f6b6b7b2d930e8203114332b04a5c49a780b06.tar.lz yuzu-86f6b6b7b2d930e8203114332b04a5c49a780b06.tar.xz yuzu-86f6b6b7b2d930e8203114332b04a5c49a780b06.tar.zst yuzu-86f6b6b7b2d930e8203114332b04a5c49a780b06.zip |
Diffstat (limited to '')
-rw-r--r-- | src/core/file_sys/romfs_factory.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/core/file_sys/romfs_factory.cpp b/src/core/file_sys/romfs_factory.cpp index aa4726cfa..1bc07dae5 100644 --- a/src/core/file_sys/romfs_factory.cpp +++ b/src/core/file_sys/romfs_factory.cpp @@ -26,13 +26,12 @@ RomFSFactory::RomFSFactory(Loader::AppLoader& app_loader, ContentProvider& provi } updatable = app_loader.IsRomFSUpdatable(); - ivfc_offset = app_loader.ReadRomFSIVFCOffset(); } RomFSFactory::~RomFSFactory() = default; void RomFSFactory::SetPackedUpdate(VirtualFile update_raw_file) { - update_raw = std::move(update_raw_file); + packed_update_raw = std::move(update_raw_file); } VirtualFile RomFSFactory::OpenCurrentProcess(u64 current_process_title_id) const { @@ -40,9 +39,11 @@ VirtualFile RomFSFactory::OpenCurrentProcess(u64 current_process_title_id) const return file; } + const auto type = ContentRecordType::Program; + const auto nca = content_provider.GetEntry(current_process_title_id, type); const PatchManager patch_manager{current_process_title_id, filesystem_controller, content_provider}; - return patch_manager.PatchRomFS(file, ivfc_offset, ContentRecordType::Program, update_raw); + return patch_manager.PatchRomFS(nca.get(), file, ContentRecordType::Program, packed_update_raw); } VirtualFile RomFSFactory::OpenPatchedRomFS(u64 title_id, ContentRecordType type) const { @@ -54,7 +55,7 @@ VirtualFile RomFSFactory::OpenPatchedRomFS(u64 title_id, ContentRecordType type) const PatchManager patch_manager{title_id, filesystem_controller, content_provider}; - return patch_manager.PatchRomFS(nca->GetRomFS(), nca->GetBaseIVFCOffset(), type); + return patch_manager.PatchRomFS(nca.get(), nca->GetRomFS(), type); } VirtualFile RomFSFactory::OpenPatchedRomFSWithProgramIndex(u64 title_id, u8 program_index, |