diff options
| author | Thog <me@thog.eu> | 2020-02-02 04:24:17 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-02-02 14:24:17 +1100 |
| commit | ea14a955243705b5d5b22868c30c174e6524b4d3 (patch) | |
| tree | 038589c60aedc54e83b98954dbf0f8ce4813df52 /Ryujinx.HLE/HOS/Services/Account/Acc/AccountService | |
| parent | f373f870f769ef65c435aa307dc3fa1be6dc6fae (diff) | |
Fix inconsistencies with UserId (#906)
* Fix inconsistencies with UserId
The account user id isn't an UUID. This PR adds a new UserId type with
the correct value ordering to avoid mismatch with LibHac's Uid. This also fix
an hardcoded value of the UserId.
As the userid has been invalid for quite some time (and to avoid forcing
users to their recreate saves), the userid has been changed to "00000000000000010000000000000000".
Also implement a stub for IApplicationFunctions::GetSaveDataSize. (see
the sources for the reason)
Fix #626
* Address jd's & Ac_k's comments
Diffstat (limited to 'Ryujinx.HLE/HOS/Services/Account/Acc/AccountService')
| -rw-r--r-- | Ryujinx.HLE/HOS/Services/Account/Acc/AccountService/AccountUtils.cs | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/Ryujinx.HLE/HOS/Services/Account/Acc/AccountService/AccountUtils.cs b/Ryujinx.HLE/HOS/Services/Account/Acc/AccountService/AccountUtils.cs index 7a70025a..8b7f1e54 100644 --- a/Ryujinx.HLE/HOS/Services/Account/Acc/AccountService/AccountUtils.cs +++ b/Ryujinx.HLE/HOS/Services/Account/Acc/AccountService/AccountUtils.cs @@ -1,5 +1,4 @@ -using Ryujinx.HLE.Utilities; -using System.Collections.Concurrent; +using System.Collections.Concurrent; using System.Collections.Generic; using System.Linq; @@ -16,14 +15,14 @@ namespace Ryujinx.HLE.HOS.Services.Account.Acc _profiles = new ConcurrentDictionary<string, UserProfile>(); } - public void AddUser(UInt128 userId, string name) + public void AddUser(UserId userId, string name) { UserProfile profile = new UserProfile(userId, name); _profiles.AddOrUpdate(userId.ToString(), profile, (key, old) => profile); } - public void OpenUser(UInt128 userId) + public void OpenUser(UserId userId) { if (_profiles.TryGetValue(userId.ToString(), out UserProfile profile)) { @@ -31,7 +30,7 @@ namespace Ryujinx.HLE.HOS.Services.Account.Acc } } - public void CloseUser(UInt128 userId) + public void CloseUser(UserId userId) { if (_profiles.TryGetValue(userId.ToString(), out UserProfile profile)) { @@ -44,7 +43,7 @@ namespace Ryujinx.HLE.HOS.Services.Account.Acc return _profiles.Count; } - internal bool TryGetUser(UInt128 userId, out UserProfile profile) + internal bool TryGetUser(UserId userId, out UserProfile profile) { return _profiles.TryGetValue(userId.ToString(), out profile); } |
