Structural and Memory Safety Improvements, Analyzer Cleanup (ryubing/ryujinx!47)

See merge request ryubing/ryujinx!47
This commit is contained in:
MrKev
2025-06-11 17:58:27 -05:00
committed by LotP
parent d03ae9c164
commit ea027d65a7
309 changed files with 1018 additions and 1247 deletions

View File

@@ -93,9 +93,8 @@ namespace Ryujinx.HLE.HOS.Services.Nv
private NvResult GetIoctlArgument(ServiceCtx context, NvIoctl ioctlCommand, out Span<byte> arguments)
{
(ulong inputDataPosition, ulong inputDataSize) = context.Request.GetBufferType0x21(0);
#pragma warning disable IDE0059 // Remove unnecessary value assignment
(ulong outputDataPosition, ulong outputDataSize) = context.Request.GetBufferType0x22(0);
#pragma warning restore IDE0059
(_, ulong outputDataSize) = context.Request.GetBufferType0x22(0);
NvIoctl.Direction ioctlDirection = ioctlCommand.DirectionValue;
uint ioctlSize = ioctlCommand.Size;
@@ -307,9 +306,8 @@ namespace Ryujinx.HLE.HOS.Services.Nv
// Initialize(u32 transfer_memory_size, handle<copy, process> current_process, handle<copy, transfer_memory> transfer_memory) -> u32 error_code
public ResultCode Initialize(ServiceCtx context)
{
#pragma warning disable IDE0059 // Remove unnecessary value assignment
long transferMemSize = context.RequestData.ReadInt64();
#pragma warning restore IDE0059
_ = context.RequestData.ReadInt64(); // transfer memory size
int transferMemHandle = context.Request.HandleDesc.ToCopy[1];
// TODO: When transfer memory will be implemented, this could be removed.
@@ -431,9 +429,7 @@ namespace Ryujinx.HLE.HOS.Services.Nv
// SetClientPID(u64, pid) -> u32 error_code
public ResultCode SetClientPid(ServiceCtx context)
{
#pragma warning disable IDE0059 // Remove unnecessary value assignment
long pid = context.RequestData.ReadInt64();
#pragma warning restore IDE0059
_ = context.RequestData.ReadInt64(); // pid
context.ResponseData.Write(0);