skip potentially unnecessary copy

merge-requests/195/head
LotP1 2025-10-26 19:23:07 +01:00
parent 1dcda7f8fd
commit 5de3814a16
1 changed files with 6 additions and 6 deletions

View File

@ -519,12 +519,12 @@ namespace Ryujinx.HLE.HOS.Services.Nv
(ulong inlineOutBufferPosition, ulong inlineOutBufferSize) = context.Request.GetBufferType0x22(1);
errorCode = GetIoctlArgument(context, ioctlCommand, out Span<byte> arguments);
byte[] temp = new byte[inlineOutBufferSize];
context.Memory.Read(inlineOutBufferPosition, temp);
Span<byte> inlineOutBuffer = new(temp);
if (!context.Memory.TryReadUnsafe(inlineOutBufferPosition, (int)inlineOutBufferSize, out Span<byte> inlineOutBuffer))
{
inlineOutBuffer = new byte[inlineOutBufferSize];
context.Memory.Read(inlineOutBufferPosition, inlineOutBuffer);
}
if (errorCode == NvResult.Success)
{