diff options
author | Zach Hilman <zachhilman@gmail.com> | 2018-10-11 03:49:20 +0200 |
---|---|---|
committer | Zach Hilman <zachhilman@gmail.com> | 2018-10-24 01:31:28 +0200 |
commit | 702622b8f1eaa1b297a27a305ac56faeadf542d7 (patch) | |
tree | 8bd4dd63015771d124b5b599240b06d08bfe203f /src/core/hle/service/acc/profile_manager.h | |
parent | acc: Load user images from config dir (diff) | |
download | yuzu-702622b8f1eaa1b297a27a305ac56faeadf542d7.tar yuzu-702622b8f1eaa1b297a27a305ac56faeadf542d7.tar.gz yuzu-702622b8f1eaa1b297a27a305ac56faeadf542d7.tar.bz2 yuzu-702622b8f1eaa1b297a27a305ac56faeadf542d7.tar.lz yuzu-702622b8f1eaa1b297a27a305ac56faeadf542d7.tar.xz yuzu-702622b8f1eaa1b297a27a305ac56faeadf542d7.tar.zst yuzu-702622b8f1eaa1b297a27a305ac56faeadf542d7.zip |
Diffstat (limited to '')
-rw-r--r-- | src/core/hle/service/acc/profile_manager.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/core/hle/service/acc/profile_manager.h b/src/core/hle/service/acc/profile_manager.h index 9ce3eb47c..1e5c2460e 100644 --- a/src/core/hle/service/acc/profile_manager.h +++ b/src/core/hle/service/acc/profile_manager.h @@ -45,6 +45,15 @@ struct UUID { std::string Format() const { return fmt::format("0x{:016X}{:016X}", uuid[1], uuid[0]); } + + std::string FormatSwitch() const { + std::array<u8, 16> s{}; + std::memcpy(s.data(), uuid.data(), sizeof(u128)); + return fmt::format("{:02x}{:02x}{:02x}{:02x}-{:02x}{:02x}-{:02x}{:02x}-{:02x}{:02x}-{:02x}{" + ":02x}{:02x}{:02x}{:02x}{:02x}", + s[0], s[1], s[2], s[3], s[4], s[5], s[6], s[7], s[8], s[9], s[10], s[11], + s[12], s[13], s[14], s[15]); + } }; static_assert(sizeof(UUID) == 16, "UUID is an invalid size!"); @@ -108,7 +117,13 @@ public: bool CanSystemRegisterUser() const; + bool RemoveUser(UUID uuid); + bool SetProfileBase(UUID uuid, const ProfileBase& profile); + private: + void ParseUserSaveFile(); + void WriteUserSaveFile(); + std::array<ProfileInfo, MAX_USERS> profiles{}; std::size_t user_count = 0; boost::optional<std::size_t> AddToProfiles(const ProfileInfo& profile); |