From 7344dee47598a26fe72de859c311354f834ca2ed Mon Sep 17 00:00:00 2001 From: Ac_K Date: Tue, 13 Apr 2021 03:16:43 +0200 Subject: account: Adds AccountManager (#2184) * account: Adds Account Manager In a way to have Custom User Profiles merged in master faster, this PR adds a `AccountManager` class (based on `AccountUtils` class) and the following changes have been made: - Adds a "default profile values" which were the old hardcoded ones. - The image profile is moved to the Account service folder. - The hardcoded UserId for the savedata is now using the `AccountManager` last opened one. - The DeviceId in Mii service is changed to the right value (checked by REd sys:set call). * Fix csproj * Addresses gdkchan's comments * Fix UserProfile fields * Fix mii GetDeviceId() * Update Ryujinx.HLE.csproj --- Ryujinx.HLE/HOS/Services/Friend/ServiceCreator/IFriendService.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'Ryujinx.HLE/HOS/Services/Friend/ServiceCreator') diff --git a/Ryujinx.HLE/HOS/Services/Friend/ServiceCreator/IFriendService.cs b/Ryujinx.HLE/HOS/Services/Friend/ServiceCreator/IFriendService.cs index 71502cda..461fde17 100644 --- a/Ryujinx.HLE/HOS/Services/Friend/ServiceCreator/IFriendService.cs +++ b/Ryujinx.HLE/HOS/Services/Friend/ServiceCreator/IFriendService.cs @@ -150,7 +150,7 @@ namespace Ryujinx.HLE.HOS.Services.Friend.ServiceCreator return ResultCode.InvalidArgument; } - if (context.Device.System.State.Account.TryGetUser(userId, out UserProfile profile)) + if (context.Device.System.AccountManager.TryGetUser(userId, out UserProfile profile)) { profile.OnlinePlayState = AccountState.Open; } @@ -171,7 +171,7 @@ namespace Ryujinx.HLE.HOS.Services.Friend.ServiceCreator return ResultCode.InvalidArgument; } - if (context.Device.System.State.Account.TryGetUser(userId, out UserProfile profile)) + if (context.Device.System.AccountManager.TryGetUser(userId, out UserProfile profile)) { profile.OnlinePlayState = AccountState.Closed; } -- cgit v1.2.3