mirror of
https://git.ryujinx.app/projects/Kenji-NX.git
synced 2026-10-09 03:18:54 +02:00
misc: chore: Use explicit types & fix object creation
This commit is contained in:
@@ -191,10 +191,10 @@ namespace Ryujinx.HLE.HOS.Services.Account.Acc
|
||||
|
||||
private void DeleteSaveData(UserId userId)
|
||||
{
|
||||
var saveDataFilter = SaveDataFilter.Make(programId: default, saveType: default,
|
||||
SaveDataFilter saveDataFilter = SaveDataFilter.Make(programId: default, saveType: default,
|
||||
new LibHac.Fs.UserId((ulong)userId.High, (ulong)userId.Low), saveDataId: default, index: default);
|
||||
|
||||
using var saveDataIterator = new UniqueRef<SaveDataIterator>();
|
||||
using UniqueRef<SaveDataIterator> saveDataIterator = new();
|
||||
|
||||
_horizonClient.Fs.OpenSaveDataIterator(ref saveDataIterator.Ref, SaveDataSpaceId.User, in saveDataFilter).ThrowIfFailure();
|
||||
|
||||
|
||||
@@ -5,6 +5,7 @@ using Ryujinx.Common.Utilities;
|
||||
using Ryujinx.HLE.HOS.Services.Account.Acc.Types;
|
||||
using System;
|
||||
using System.Collections.Concurrent;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
|
||||
@@ -28,7 +29,7 @@ namespace Ryujinx.HLE.HOS.Services.Account.Acc
|
||||
{
|
||||
ProfilesJson profilesJson = JsonHelper.DeserializeFromFile(_profilesJsonPath, _serializerContext.ProfilesJson);
|
||||
|
||||
foreach (var profile in profilesJson.Profiles)
|
||||
foreach (UserProfileJson profile in profilesJson.Profiles)
|
||||
{
|
||||
UserProfile addedProfile = new(new UserId(profile.UserId), profile.Name, profile.Image, profile.LastModifiedTimestamp);
|
||||
|
||||
@@ -68,7 +69,7 @@ namespace Ryujinx.HLE.HOS.Services.Account.Acc
|
||||
LastOpened = LastOpened.ToString(),
|
||||
};
|
||||
|
||||
foreach (var profile in profiles)
|
||||
foreach (KeyValuePair<string, UserProfile> profile in profiles)
|
||||
{
|
||||
profilesJson.Profiles.Add(new UserProfileJson()
|
||||
{
|
||||
|
||||
@@ -51,7 +51,7 @@ namespace Ryujinx.HLE.HOS.Services.Account.Acc.AccountService
|
||||
byte[] deviceAccountId = new byte[0x10];
|
||||
RandomNumberGenerator.Fill(deviceAccountId);
|
||||
|
||||
var descriptor = new SecurityTokenDescriptor
|
||||
SecurityTokenDescriptor descriptor = new()
|
||||
{
|
||||
Subject = new ClaimsIdentity([new Claim(JwtRegisteredClaimNames.Sub, Convert.ToHexString(rawUserId).ToLower())]),
|
||||
SigningCredentials = credentials,
|
||||
|
||||
Reference in New Issue
Block a user