misc: chore: more correct last used user checking

This commit is contained in:
Evan Husted 2025-01-20 13:33:59 -06:00
parent d135385cab
commit f42b2ed59d

View File

@ -56,7 +56,7 @@ namespace Ryujinx.HLE.HOS.Services.Account.Acc
ProfilesJson profilesJson = JsonHelper.DeserializeFromFile(_profilesJsonPath, _serializerContext.ProfilesJson); ProfilesJson profilesJson = JsonHelper.DeserializeFromFile(_profilesJsonPath, _serializerContext.ProfilesJson);
return profilesJson.Profiles return profilesJson.Profiles
.FindFirst(profile => profile.AccountState == AccountState.Open) .FindFirst(profile => profile.UserId == profilesJson.LastOpened)
.Convert(profileJson => new UserProfile(new UserId(profileJson.UserId), profileJson.Name, .Convert(profileJson => new UserProfile(new UserId(profileJson.UserId), profileJson.Name,
profileJson.Image, profileJson.LastModifiedTimestamp)); profileJson.Image, profileJson.LastModifiedTimestamp));
} }