summaryrefslogtreecommitdiffstats
path: root/src/core/hle/service
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2018-12-05 01:59:52 +0100
committerGitHub <noreply@github.com>2018-12-05 01:59:52 +0100
commitd08d4a366b70751cfbbbbb1844df3f62fd0da8a1 (patch)
treeb66fada812f416a30041fc4bcb6f7b15f5af7490 /src/core/hle/service
parentMerge pull request #1837 from lioncash/map (diff)
parentfile_sys: Implement system archive synthesizer for NgWord (806) (diff)
downloadyuzu-d08d4a366b70751cfbbbbb1844df3f62fd0da8a1.tar
yuzu-d08d4a366b70751cfbbbbb1844df3f62fd0da8a1.tar.gz
yuzu-d08d4a366b70751cfbbbbb1844df3f62fd0da8a1.tar.bz2
yuzu-d08d4a366b70751cfbbbbb1844df3f62fd0da8a1.tar.lz
yuzu-d08d4a366b70751cfbbbbb1844df3f62fd0da8a1.tar.xz
yuzu-d08d4a366b70751cfbbbbb1844df3f62fd0da8a1.tar.zst
yuzu-d08d4a366b70751cfbbbbb1844df3f62fd0da8a1.zip
Diffstat (limited to 'src/core/hle/service')
-rw-r--r--src/core/hle/service/filesystem/fsp_srv.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/core/hle/service/filesystem/fsp_srv.cpp b/src/core/hle/service/filesystem/fsp_srv.cpp
index 694ec40ec..d2ffd5776 100644
--- a/src/core/hle/service/filesystem/fsp_srv.cpp
+++ b/src/core/hle/service/filesystem/fsp_srv.cpp
@@ -20,6 +20,7 @@
#include "core/file_sys/nca_metadata.h"
#include "core/file_sys/patch_manager.h"
#include "core/file_sys/savedata_factory.h"
+#include "core/file_sys/system_archive/system_archive.h"
#include "core/file_sys/vfs.h"
#include "core/hle/ipc_helpers.h"
#include "core/hle/kernel/process.h"
@@ -831,6 +832,15 @@ void FSP_SRV::OpenDataStorageByDataId(Kernel::HLERequestContext& ctx) {
auto data = OpenRomFS(title_id, storage_id, FileSys::ContentRecordType::Data);
if (data.Failed()) {
+ const auto archive = FileSys::SystemArchive::SynthesizeSystemArchive(title_id);
+
+ if (archive != nullptr) {
+ IPC::ResponseBuilder rb{ctx, 2, 0, 1};
+ rb.Push(RESULT_SUCCESS);
+ rb.PushIpcInterface(std::make_shared<IStorage>(archive));
+ return;
+ }
+
// TODO(DarkLordZach): Find the right error code to use here
LOG_ERROR(Service_FS,
"could not open data storage with title_id={:016X}, storage_id={:02X}", title_id,