Fix ~3500 analyser issues

See merge request ryubing/ryujinx!44
This commit is contained in:
MrKev 2025-05-30 17:08:34 -05:00 committed by LotP
parent 417df486b1
commit 361d0c5632
622 changed files with 3080 additions and 2652 deletions

View file

@ -145,6 +145,7 @@ namespace Ryujinx.HLE.HOS.Services.Nfc.Nfp
break;
}
}
_cancelTokenSource = new CancellationTokenSource();
Task.Run(() =>
{
@ -196,6 +197,7 @@ namespace Ryujinx.HLE.HOS.Services.Nfc.Nfp
break;
}
}
return ResultCode.Success;
}
@ -601,7 +603,7 @@ namespace Ryujinx.HLE.HOS.Services.Nfc.Nfp
}
else
{
if (context.Device.System.NfpDevices[i].State == NfpDeviceState.TagMounted || context.Device.System.NfpDevices[i].State == NfpDeviceState.TagFound)
if (context.Device.System.NfpDevices[i].State is NfpDeviceState.TagMounted or NfpDeviceState.TagFound)
{
byte[] uuid = VirtualAmiibo.GenerateUuid(context.Device.System.NfpDevices[i].AmiiboId, context.Device.System.NfpDevices[i].UseRandomUuid);
@ -877,6 +879,7 @@ namespace Ryujinx.HLE.HOS.Services.Nfc.Nfp
return ResultCode.Success;
}
}
return ResultCode.DeviceNotFound;
}
@ -972,7 +975,7 @@ namespace Ryujinx.HLE.HOS.Services.Nfc.Nfp
{
// TODO: Find the differencies between IUser and ISystem/IDebug.
if (_permissionLevel == NfpPermissionLevel.Debug || _permissionLevel == NfpPermissionLevel.System)
if (_permissionLevel is NfpPermissionLevel.Debug or NfpPermissionLevel.System)
{
return GetRegisterInfo(context);
}