summaryrefslogtreecommitdiffstats
path: root/src/core/hle/service/filesystem/filesystem.cpp
diff options
context:
space:
mode:
authorSubv <subv2112@gmail.com>2018-02-19 06:32:00 +0100
committerSubv <subv2112@gmail.com>2018-03-02 01:03:52 +0100
commitd140c8ecf7514e925340cbd3340991c8df0d0c15 (patch)
treed0a91ded4bde7eb1d73f9e6617871d8ff37f08bd /src/core/hle/service/filesystem/filesystem.cpp
parentResultCode: Mark any error code that isn't 0 as an error. (diff)
downloadyuzu-d140c8ecf7514e925340cbd3340991c8df0d0c15.tar
yuzu-d140c8ecf7514e925340cbd3340991c8df0d0c15.tar.gz
yuzu-d140c8ecf7514e925340cbd3340991c8df0d0c15.tar.bz2
yuzu-d140c8ecf7514e925340cbd3340991c8df0d0c15.tar.lz
yuzu-d140c8ecf7514e925340cbd3340991c8df0d0c15.tar.xz
yuzu-d140c8ecf7514e925340cbd3340991c8df0d0c15.tar.zst
yuzu-d140c8ecf7514e925340cbd3340991c8df0d0c15.zip
Diffstat (limited to 'src/core/hle/service/filesystem/filesystem.cpp')
-rw-r--r--src/core/hle/service/filesystem/filesystem.cpp11
1 files changed, 9 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);
}