aboutsummaryrefslogtreecommitdiff
path: root/src/core/file_sys/romfs_factory.cpp
diff options
context:
space:
mode:
authorZach Hilman <zachhilman@gmail.com>2018-08-28 22:37:42 -0400
committerZach Hilman <zachhilman@gmail.com>2018-09-04 16:24:02 -0400
commitb8f8b0fa473d4d4e90eef7587387044e911bebfa (patch)
tree48af4f9227030e247474334067515a5cdd0f5283 /src/core/file_sys/romfs_factory.cpp
parente88835cd40028271ef8de2c3f6eea9ef34e2be7a (diff)
bktr: Implement IVFC offset shifting
Fixes base game read errors
Diffstat (limited to 'src/core/file_sys/romfs_factory.cpp')
-rw-r--r--src/core/file_sys/romfs_factory.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/core/file_sys/romfs_factory.cpp b/src/core/file_sys/romfs_factory.cpp
index fc9cf1eca7..33ec62491a 100644
--- a/src/core/file_sys/romfs_factory.cpp
+++ b/src/core/file_sys/romfs_factory.cpp
@@ -24,14 +24,15 @@ RomFSFactory::RomFSFactory(Loader::AppLoader& app_loader) {
}
updatable = app_loader.IsRomFSUpdatable();
+ ivfc_offset = app_loader.ReadRomFSIVFCOffset();
}
ResultVal<VirtualFile> RomFSFactory::OpenCurrentProcess() {
if (!updatable)
return MakeResult<VirtualFile>(file);
- const PatchManager patch_manager(Core::CurrentProcess()->process_id);
- return MakeResult<VirtualFile>(patch_manager.PatchRomFS(file));
+ const PatchManager patch_manager(Core::CurrentProcess()->program_id);
+ return MakeResult<VirtualFile>(patch_manager.PatchRomFS(file, ivfc_offset));
}
ResultVal<VirtualFile> RomFSFactory::Open(u64 title_id, StorageId storage, ContentRecordType type) {