diff options
author | liamwhite <liamwhite@users.noreply.github.com> | 2024-01-07 13:33:31 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-01-07 13:33:31 +0100 |
commit | 87430acff1c981e80c40f55fd76c312a37b87a3c (patch) | |
tree | cb8b1058953a873c680e5b90fa1fbd63ef2b1faa /src/core | |
parent | Merge pull request #12596 from german77/hid_qlaunch (diff) | |
parent | android: Re-add global save manager (diff) | |
download | yuzu-87430acff1c981e80c40f55fd76c312a37b87a3c.tar yuzu-87430acff1c981e80c40f55fd76c312a37b87a3c.tar.gz yuzu-87430acff1c981e80c40f55fd76c312a37b87a3c.tar.bz2 yuzu-87430acff1c981e80c40f55fd76c312a37b87a3c.tar.lz yuzu-87430acff1c981e80c40f55fd76c312a37b87a3c.tar.xz yuzu-87430acff1c981e80c40f55fd76c312a37b87a3c.tar.zst yuzu-87430acff1c981e80c40f55fd76c312a37b87a3c.zip |
Diffstat (limited to 'src/core')
-rw-r--r-- | src/core/file_sys/savedata_factory.cpp | 9 | ||||
-rw-r--r-- | src/core/file_sys/savedata_factory.h | 1 |
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, } } +std::string SaveDataFactory::GetUserGameSaveDataRoot(u128 user_id, bool future) { + if (future) { + Common::UUID uuid; + std::memcpy(uuid.uuid.data(), user_id.data(), sizeof(Common::UUID)); + return fmt::format("/user/save/account/{}", uuid.RawString()); + } + return fmt::format("/user/save/{:016X}/{:016X}{:016X}", 0, user_id[1], user_id[0]); +} + SaveDataSize SaveDataFactory::ReadSaveDataSize(SaveDataType type, u64 title_id, u128 user_id) const { 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: static std::string GetSaveDataSpaceIdPath(SaveDataSpaceId space); static std::string GetFullPath(Core::System& system, VirtualDir dir, SaveDataSpaceId space, SaveDataType type, u64 title_id, u128 user_id, u64 save_id); + static std::string GetUserGameSaveDataRoot(u128 user_id, bool future); SaveDataSize ReadSaveDataSize(SaveDataType type, u64 title_id, u128 user_id) const; void WriteSaveDataSize(SaveDataType type, u64 title_id, u128 user_id, |