summaryrefslogtreecommitdiffstats
path: root/src/core/hle/service
diff options
context:
space:
mode:
authorZach Hilman <zachhilman@gmail.com>2018-10-29 21:08:03 +0100
committerZach Hilman <zachhilman@gmail.com>2018-10-29 21:08:03 +0100
commit9078bb9854cff3f77ac28a15dffff06bb31b3755 (patch)
treee8d98a8f4ee6709aad4900a7885682ef49c64270 /src/core/hle/service
parentMerge pull request #1613 from ReinUsesLisp/gl-utils (diff)
downloadyuzu-9078bb9854cff3f77ac28a15dffff06bb31b3755.tar
yuzu-9078bb9854cff3f77ac28a15dffff06bb31b3755.tar.gz
yuzu-9078bb9854cff3f77ac28a15dffff06bb31b3755.tar.bz2
yuzu-9078bb9854cff3f77ac28a15dffff06bb31b3755.tar.lz
yuzu-9078bb9854cff3f77ac28a15dffff06bb31b3755.tar.xz
yuzu-9078bb9854cff3f77ac28a15dffff06bb31b3755.tar.zst
yuzu-9078bb9854cff3f77ac28a15dffff06bb31b3755.zip
Diffstat (limited to '')
-rw-r--r--src/core/hle/service/filesystem/filesystem.cpp25
-rw-r--r--src/core/hle/service/filesystem/filesystem.h1
2 files changed, 22 insertions, 4 deletions
diff --git a/src/core/hle/service/filesystem/filesystem.cpp b/src/core/hle/service/filesystem/filesystem.cpp
index e32a7c48e..234a8687b 100644
--- a/src/core/hle/service/filesystem/filesystem.cpp
+++ b/src/core/hle/service/filesystem/filesystem.cpp
@@ -360,6 +360,15 @@ FileSys::VirtualDir GetModificationLoadRoot(u64 title_id) {
return bis_factory->GetModificationLoadRoot(title_id);
}
+FileSys::VirtualDir GetModificationDumpRoot(u64 title_id) {
+ LOG_TRACE(Service_FS, "Opening mod dump root for tid={:016X}", title_id);
+
+ if (bis_factory == nullptr)
+ return nullptr;
+
+ return bis_factory->GetModificationDumpRoot(title_id);
+}
+
void CreateFactories(FileSys::VfsFilesystem& vfs, bool overwrite) {
if (overwrite) {
bis_factory = nullptr;
@@ -373,13 +382,21 @@ void CreateFactories(FileSys::VfsFilesystem& vfs, bool overwrite) {
FileSys::Mode::ReadWrite);
auto load_directory = vfs.OpenDirectory(FileUtil::GetUserPath(FileUtil::UserPath::LoadDir),
FileSys::Mode::ReadWrite);
+ auto dump_directory = vfs.OpenDirectory(FileUtil::GetUserPath(FileUtil::UserPath::DumpDir),
+ FileSys::Mode::ReadWrite);
- if (bis_factory == nullptr)
- bis_factory = std::make_unique<FileSys::BISFactory>(nand_directory, load_directory);
- if (save_data_factory == nullptr)
+ if (bis_factory == nullptr) {
+ bis_factory =
+ std::make_unique<FileSys::BISFactory>(nand_directory, load_directory, dump_directory);
+ }
+
+ if (save_data_factory == nullptr) {
save_data_factory = std::make_unique<FileSys::SaveDataFactory>(std::move(nand_directory));
- if (sdmc_factory == nullptr)
+ }
+
+ if (sdmc_factory == nullptr) {
sdmc_factory = std::make_unique<FileSys::SDMCFactory>(std::move(sd_directory));
+ }
}
void InstallInterfaces(SM::ServiceManager& service_manager, FileSys::VfsFilesystem& vfs) {
diff --git a/src/core/hle/service/filesystem/filesystem.h b/src/core/hle/service/filesystem/filesystem.h
index 6ca5c5636..b18652a68 100644
--- a/src/core/hle/service/filesystem/filesystem.h
+++ b/src/core/hle/service/filesystem/filesystem.h
@@ -54,6 +54,7 @@ FileSys::RegisteredCache* GetUserNANDContents();
FileSys::RegisteredCache* GetSDMCContents();
FileSys::VirtualDir GetModificationLoadRoot(u64 title_id);
+FileSys::VirtualDir GetModificationDumpRoot(u64 title_id);
// Creates the SaveData, SDMC, and BIS Factories. Should be called once and before any function
// above is called.