summaryrefslogtreecommitdiffstats
path: root/src/core/loader
diff options
context:
space:
mode:
authorZach Hilman <zachhilman@gmail.com>2018-10-05 14:53:45 +0200
committerZach Hilman <zachhilman@gmail.com>2018-10-05 14:53:51 +0200
commit38c2ac95af814e21e65e2785b276c4f64bfead71 (patch)
tree513d2b50eeb2dc24f709c7ca109b5ce5bd17d6ed /src/core/loader
parentpatch_manager: Add support for NSP packed updates (diff)
downloadyuzu-38c2ac95af814e21e65e2785b276c4f64bfead71.tar
yuzu-38c2ac95af814e21e65e2785b276c4f64bfead71.tar.gz
yuzu-38c2ac95af814e21e65e2785b276c4f64bfead71.tar.bz2
yuzu-38c2ac95af814e21e65e2785b276c4f64bfead71.tar.lz
yuzu-38c2ac95af814e21e65e2785b276c4f64bfead71.tar.xz
yuzu-38c2ac95af814e21e65e2785b276c4f64bfead71.tar.zst
yuzu-38c2ac95af814e21e65e2785b276c4f64bfead71.zip
Diffstat (limited to 'src/core/loader')
-rw-r--r--src/core/loader/nsp.cpp6
-rw-r--r--src/core/loader/xci.cpp5
2 files changed, 11 insertions, 0 deletions
diff --git a/src/core/loader/nsp.cpp b/src/core/loader/nsp.cpp
index a630b618c..5534ce01c 100644
--- a/src/core/loader/nsp.cpp
+++ b/src/core/loader/nsp.cpp
@@ -10,8 +10,10 @@
#include "core/file_sys/control_metadata.h"
#include "core/file_sys/nca_metadata.h"
#include "core/file_sys/patch_manager.h"
+#include "core/file_sys/registered_cache.h"
#include "core/file_sys/submission_package.h"
#include "core/hle/kernel/process.h"
+#include "core/hle/service/filesystem/filesystem.h"
#include "core/loader/deconstructed_rom_directory.h"
#include "core/loader/nca.h"
#include "core/loader/nsp.h"
@@ -91,6 +93,10 @@ ResultStatus AppLoader_NSP::Load(Kernel::Process& process) {
if (result != ResultStatus::Success)
return result;
+ FileSys::VirtualFile update_raw;
+ if (ReadUpdateRaw(update_raw) == ResultStatus::Success && update_raw != nullptr)
+ Service::FileSystem::SetPackedUpdate(std::move(update_raw));
+
is_loaded = true;
return ResultStatus::Success;
diff --git a/src/core/loader/xci.cpp b/src/core/loader/xci.cpp
index 9d91ef03a..ee5452eb9 100644
--- a/src/core/loader/xci.cpp
+++ b/src/core/loader/xci.cpp
@@ -13,6 +13,7 @@
#include "core/file_sys/romfs.h"
#include "core/file_sys/submission_package.h"
#include "core/hle/kernel/process.h"
+#include "core/hle/service/filesystem/filesystem.h"
#include "core/loader/nca.h"
#include "core/loader/xci.h"
@@ -66,6 +67,10 @@ ResultStatus AppLoader_XCI::Load(Kernel::Process& process) {
if (result != ResultStatus::Success)
return result;
+ FileSys::VirtualFile update_raw;
+ if (ReadUpdateRaw(update_raw) == ResultStatus::Success && update_raw != nullptr)
+ Service::FileSystem::SetPackedUpdate(std::move(update_raw));
+
is_loaded = true;
return ResultStatus::Success;