summaryrefslogtreecommitdiffstats
path: root/src/core/hle/service/filesystem
diff options
context:
space:
mode:
authorZach Hilman <zachhilman@gmail.com>2018-11-16 04:35:16 +0100
committerZach Hilman <zachhilman@gmail.com>2018-11-16 04:35:16 +0100
commit4838bc8ddc466db2317ab20834aeaafd994dc1bb (patch)
treed638ba5a03814dc4d83f7bdc79d5bc750ba68e5d /src/core/hle/service/filesystem
parentfile_sys: Add framework for synthesizing open source archives (diff)
downloadyuzu-4838bc8ddc466db2317ab20834aeaafd994dc1bb.tar
yuzu-4838bc8ddc466db2317ab20834aeaafd994dc1bb.tar.gz
yuzu-4838bc8ddc466db2317ab20834aeaafd994dc1bb.tar.bz2
yuzu-4838bc8ddc466db2317ab20834aeaafd994dc1bb.tar.lz
yuzu-4838bc8ddc466db2317ab20834aeaafd994dc1bb.tar.xz
yuzu-4838bc8ddc466db2317ab20834aeaafd994dc1bb.tar.zst
yuzu-4838bc8ddc466db2317ab20834aeaafd994dc1bb.zip
Diffstat (limited to 'src/core/hle/service/filesystem')
-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 c1c83a11d..f06bb33ae 100644
--- a/src/core/hle/service/filesystem/fsp_srv.cpp
+++ b/src/core/hle/service/filesystem/fsp_srv.cpp
@@ -19,6 +19,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"
@@ -657,6 +658,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,