diff options
| author | Zach Hilman <zachhilman@gmail.com> | 2018-08-28 22:37:42 -0400 |
|---|---|---|
| committer | Zach Hilman <zachhilman@gmail.com> | 2018-09-04 16:24:02 -0400 |
| commit | a6e75cd45b75a202eed1a68692e33e7732789dd2 (patch) | |
| tree | 48af4f9227030e247474334067515a5cdd0f5283 /src/core/file_sys/romfs_factory.cpp | |
| parent | 9664ce255db09f4501db642c1e82d8cf8f274a22 (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.cpp | 5 |
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 fc9cf1eca..33ec62491 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) { |
