summaryrefslogtreecommitdiffstats
path: root/src/core/hle
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/hle')
-rw-r--r--src/core/hle/service/filesystem/filesystem.cpp11
-rw-r--r--src/core/hle/service/filesystem/filesystem.h1
2 files changed, 10 insertions, 2 deletions
diff --git a/src/core/hle/service/filesystem/filesystem.cpp b/src/core/hle/service/filesystem/filesystem.cpp
index 4b47548fd..32752aea5 100644
--- a/src/core/hle/service/filesystem/filesystem.cpp
+++ b/src/core/hle/service/filesystem/filesystem.cpp
@@ -3,7 +3,9 @@
// Refer to the license.txt file included.
#include <boost/container/flat_map.hpp>
+#include "common/file_util.h"
#include "core/file_sys/filesystem.h"
+#include "core/file_sys/savedata_factory.h"
#include "core/hle/service/filesystem/filesystem.h"
#include "core/hle/service/filesystem/fsp_srv.h"
@@ -41,12 +43,17 @@ ResultVal<std::unique_ptr<FileSys::FileSystemBackend>> OpenFileSystem(Type type,
return itr->second->Open(path);
}
-void UnregisterFileSystems() {
+void RegisterFileSystems() {
filesystem_map.clear();
+
+ std::string nand_directory = FileUtil::GetUserPath(D_NAND_IDX);
+
+ auto savedata = std::make_unique<FileSys::SaveData_Factory>(std::move(nand_directory));
+ RegisterFileSystem(std::move(savedata), Type::SaveData);
}
void InstallInterfaces(SM::ServiceManager& service_manager) {
- UnregisterFileSystems();
+ RegisterFileSystems();
std::make_shared<FSP_SRV>()->InstallAsService(service_manager);
}
diff --git a/src/core/hle/service/filesystem/filesystem.h b/src/core/hle/service/filesystem/filesystem.h
index a674c9493..80f318676 100644
--- a/src/core/hle/service/filesystem/filesystem.h
+++ b/src/core/hle/service/filesystem/filesystem.h
@@ -25,6 +25,7 @@ namespace FileSystem {
/// Supported FileSystem types
enum class Type {
RomFS = 1,
+ SaveData = 2,
};
/**