summaryrefslogtreecommitdiffstats
path: root/src/core/loader
diff options
context:
space:
mode:
authorZach Hilman <zachhilman@gmail.com>2018-08-29 04:37:42 +0200
committerZach Hilman <zachhilman@gmail.com>2018-09-04 22:24:02 +0200
commita6e75cd45b75a202eed1a68692e33e7732789dd2 (patch)
tree48af4f9227030e247474334067515a5cdd0f5283 /src/core/loader
parentbktr: Fix missing includes and optimize style (diff)
downloadyuzu-a6e75cd45b75a202eed1a68692e33e7732789dd2.tar
yuzu-a6e75cd45b75a202eed1a68692e33e7732789dd2.tar.gz
yuzu-a6e75cd45b75a202eed1a68692e33e7732789dd2.tar.bz2
yuzu-a6e75cd45b75a202eed1a68692e33e7732789dd2.tar.lz
yuzu-a6e75cd45b75a202eed1a68692e33e7732789dd2.tar.xz
yuzu-a6e75cd45b75a202eed1a68692e33e7732789dd2.tar.zst
yuzu-a6e75cd45b75a202eed1a68692e33e7732789dd2.zip
Diffstat (limited to 'src/core/loader')
-rw-r--r--src/core/loader/loader.h9
-rw-r--r--src/core/loader/nca.cpp6
-rw-r--r--src/core/loader/nca.h1
3 files changed, 16 insertions, 0 deletions
diff --git a/src/core/loader/loader.h b/src/core/loader/loader.h
index 225c05127..843c4bb91 100644
--- a/src/core/loader/loader.h
+++ b/src/core/loader/loader.h
@@ -215,6 +215,15 @@ public:
}
/**
+ * Gets the difference between the start of the IVFC header and the start of level 6 (RomFS)
+ * data. Needed for bktr patching.
+ * @return IVFC offset for romfs.
+ */
+ virtual u64 ReadRomFSIVFCOffset() const {
+ return 0;
+ }
+
+ /**
* Get the title of the application
* @param title Reference to store the application title into
* @return ResultStatus result of function
diff --git a/src/core/loader/nca.cpp b/src/core/loader/nca.cpp
index 6b1c27b47..6aaffae59 100644
--- a/src/core/loader/nca.cpp
+++ b/src/core/loader/nca.cpp
@@ -71,6 +71,12 @@ ResultStatus AppLoader_NCA::ReadRomFS(FileSys::VirtualFile& dir) {
return ResultStatus::Success;
}
+u64 AppLoader_NCA::ReadRomFSIVFCOffset() const {
+ if (nca == nullptr)
+ return 0;
+ return nca->GetBaseIVFCOffset();
+}
+
ResultStatus AppLoader_NCA::ReadProgramId(u64& out_program_id) {
if (nca == nullptr || nca->GetStatus() != ResultStatus::Success)
return ResultStatus::ErrorNotInitialized;
diff --git a/src/core/loader/nca.h b/src/core/loader/nca.h
index 326f84857..10be197c4 100644
--- a/src/core/loader/nca.h
+++ b/src/core/loader/nca.h
@@ -37,6 +37,7 @@ public:
ResultStatus Load(Kernel::SharedPtr<Kernel::Process>& process) override;
ResultStatus ReadRomFS(FileSys::VirtualFile& dir) override;
+ u64 ReadRomFSIVFCOffset() const override;
ResultStatus ReadProgramId(u64& out_program_id) override;
private: