summaryrefslogtreecommitdiffstats
path: root/src/core/loader/ncch.cpp
diff options
context:
space:
mode:
authorMerry <MerryMage@users.noreply.github.com>2016-12-16 16:08:04 +0100
committerGitHub <noreply@github.com>2016-12-16 16:08:04 +0100
commitacc83a1c32ef43c6ff84926ff21dc5ef872decc0 (patch)
tree95c20b3525c9e3a92444d45d3b5e071cea4e7dd7 /src/core/loader/ncch.cpp
parentMerge pull request #2338 from wwylele/fix-dead (diff)
parentmain: Open folder when open save folder location context menu is clicked (diff)
downloadyuzu-acc83a1c32ef43c6ff84926ff21dc5ef872decc0.tar
yuzu-acc83a1c32ef43c6ff84926ff21dc5ef872decc0.tar.gz
yuzu-acc83a1c32ef43c6ff84926ff21dc5ef872decc0.tar.bz2
yuzu-acc83a1c32ef43c6ff84926ff21dc5ef872decc0.tar.lz
yuzu-acc83a1c32ef43c6ff84926ff21dc5ef872decc0.tar.xz
yuzu-acc83a1c32ef43c6ff84926ff21dc5ef872decc0.tar.zst
yuzu-acc83a1c32ef43c6ff84926ff21dc5ef872decc0.zip
Diffstat (limited to 'src/core/loader/ncch.cpp')
-rw-r--r--src/core/loader/ncch.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/core/loader/ncch.cpp b/src/core/loader/ncch.cpp
index d4be61e0e..6f2164428 100644
--- a/src/core/loader/ncch.cpp
+++ b/src/core/loader/ncch.cpp
@@ -344,6 +344,18 @@ ResultStatus AppLoader_NCCH::ReadLogo(std::vector<u8>& buffer) {
return LoadSectionExeFS("logo", buffer);
}
+ResultStatus AppLoader_NCCH::ReadProgramId(u64& out_program_id) {
+ if (!file.IsOpen())
+ return ResultStatus::Error;
+
+ ResultStatus result = LoadExeFS();
+ if (result != ResultStatus::Success)
+ return result;
+
+ out_program_id = ncch_header.program_id;
+ return ResultStatus::Success;
+}
+
ResultStatus AppLoader_NCCH::ReadRomFS(std::shared_ptr<FileUtil::IOFile>& romfs_file, u64& offset,
u64& size) {
if (!file.IsOpen())