diff options
Diffstat (limited to 'src/core/hle')
| -rw-r--r-- | src/core/hle/service/filesystem/filesystem.cpp | 11 | ||||
| -rw-r--r-- | src/core/hle/service/filesystem/filesystem.h | 1 |
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 @@ | |||
| 3 | // Refer to the license.txt file included. | 3 | // Refer to the license.txt file included. |
| 4 | 4 | ||
| 5 | #include <boost/container/flat_map.hpp> | 5 | #include <boost/container/flat_map.hpp> |
| 6 | #include "common/file_util.h" | ||
| 6 | #include "core/file_sys/filesystem.h" | 7 | #include "core/file_sys/filesystem.h" |
| 8 | #include "core/file_sys/savedata_factory.h" | ||
| 7 | #include "core/hle/service/filesystem/filesystem.h" | 9 | #include "core/hle/service/filesystem/filesystem.h" |
| 8 | #include "core/hle/service/filesystem/fsp_srv.h" | 10 | #include "core/hle/service/filesystem/fsp_srv.h" |
| 9 | 11 | ||
| @@ -41,12 +43,17 @@ ResultVal<std::unique_ptr<FileSys::FileSystemBackend>> OpenFileSystem(Type type, | |||
| 41 | return itr->second->Open(path); | 43 | return itr->second->Open(path); |
| 42 | } | 44 | } |
| 43 | 45 | ||
| 44 | void UnregisterFileSystems() { | 46 | void RegisterFileSystems() { |
| 45 | filesystem_map.clear(); | 47 | filesystem_map.clear(); |
| 48 | |||
| 49 | std::string nand_directory = FileUtil::GetUserPath(D_NAND_IDX); | ||
| 50 | |||
| 51 | auto savedata = std::make_unique<FileSys::SaveData_Factory>(std::move(nand_directory)); | ||
| 52 | RegisterFileSystem(std::move(savedata), Type::SaveData); | ||
| 46 | } | 53 | } |
| 47 | 54 | ||
| 48 | void InstallInterfaces(SM::ServiceManager& service_manager) { | 55 | void InstallInterfaces(SM::ServiceManager& service_manager) { |
| 49 | UnregisterFileSystems(); | 56 | RegisterFileSystems(); |
| 50 | std::make_shared<FSP_SRV>()->InstallAsService(service_manager); | 57 | std::make_shared<FSP_SRV>()->InstallAsService(service_manager); |
| 51 | } | 58 | } |
| 52 | 59 | ||
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 { | |||
| 25 | /// Supported FileSystem types | 25 | /// Supported FileSystem types |
| 26 | enum class Type { | 26 | enum class Type { |
| 27 | RomFS = 1, | 27 | RomFS = 1, |
| 28 | SaveData = 2, | ||
| 28 | }; | 29 | }; |
| 29 | 30 | ||
| 30 | /** | 31 | /** |