summaryrefslogtreecommitdiff
path: root/src/core
diff options
context:
space:
mode:
Diffstat (limited to 'src/core')
-rw-r--r--src/core/file_sys/savedata_factory.cpp9
-rw-r--r--src/core/file_sys/savedata_factory.h1
2 files changed, 10 insertions, 0 deletions
diff --git a/src/core/file_sys/savedata_factory.cpp b/src/core/file_sys/savedata_factory.cpp
index 8d5d593e8..12b3bd797 100644
--- a/src/core/file_sys/savedata_factory.cpp
+++ b/src/core/file_sys/savedata_factory.cpp
@@ -189,6 +189,15 @@ std::string SaveDataFactory::GetFullPath(Core::System& system, VirtualDir dir,
189 } 189 }
190} 190}
191 191
192std::string SaveDataFactory::GetUserGameSaveDataRoot(u128 user_id, bool future) {
193 if (future) {
194 Common::UUID uuid;
195 std::memcpy(uuid.uuid.data(), user_id.data(), sizeof(Common::UUID));
196 return fmt::format("/user/save/account/{}", uuid.RawString());
197 }
198 return fmt::format("/user/save/{:016X}/{:016X}{:016X}", 0, user_id[1], user_id[0]);
199}
200
192SaveDataSize SaveDataFactory::ReadSaveDataSize(SaveDataType type, u64 title_id, 201SaveDataSize SaveDataFactory::ReadSaveDataSize(SaveDataType type, u64 title_id,
193 u128 user_id) const { 202 u128 user_id) const {
194 const auto path = 203 const auto path =
diff --git a/src/core/file_sys/savedata_factory.h b/src/core/file_sys/savedata_factory.h
index e3a0f8cef..fd4887e99 100644
--- a/src/core/file_sys/savedata_factory.h
+++ b/src/core/file_sys/savedata_factory.h
@@ -101,6 +101,7 @@ public:
101 static std::string GetSaveDataSpaceIdPath(SaveDataSpaceId space); 101 static std::string GetSaveDataSpaceIdPath(SaveDataSpaceId space);
102 static std::string GetFullPath(Core::System& system, VirtualDir dir, SaveDataSpaceId space, 102 static std::string GetFullPath(Core::System& system, VirtualDir dir, SaveDataSpaceId space,
103 SaveDataType type, u64 title_id, u128 user_id, u64 save_id); 103 SaveDataType type, u64 title_id, u128 user_id, u64 save_id);
104 static std::string GetUserGameSaveDataRoot(u128 user_id, bool future);
104 105
105 SaveDataSize ReadSaveDataSize(SaveDataType type, u64 title_id, u128 user_id) const; 106 SaveDataSize ReadSaveDataSize(SaveDataType type, u64 title_id, u128 user_id) const;
106 void WriteSaveDataSize(SaveDataType type, u64 title_id, u128 user_id, 107 void WriteSaveDataSize(SaveDataType type, u64 title_id, u128 user_id,