diff --git a/Ryujinx.Core/OsHle/Ipc/IpcMessage.cs b/Ryujinx.Core/OsHle/Ipc/IpcMessage.cs index c985a4bbdd..c03874fb15 100644 --- a/Ryujinx.Core/OsHle/Ipc/IpcMessage.cs +++ b/Ryujinx.Core/OsHle/Ipc/IpcMessage.cs @@ -176,12 +176,16 @@ namespace Ryujinx.Core.OsHle.Ipc public (long Position, long Size) GetBufferType0x21() { - if (PtrBuff.Count > 0 && PtrBuff[0].Position != 0 && PtrBuff[0].Size != 0) + if (PtrBuff.Count != 0 && + PtrBuff[0].Position != 0 && + PtrBuff[0].Size != 0) { return (PtrBuff[0].Position, PtrBuff[0].Size); } - if (SendBuff.Count > 0 && SendBuff[0].Position != 0 && SendBuff[0].Size != 0) + if (SendBuff.Count != 0 && + SendBuff[0].Position != 0 && + SendBuff[0].Size != 0) { return (SendBuff[0].Position, SendBuff[0].Size); } @@ -191,12 +195,16 @@ namespace Ryujinx.Core.OsHle.Ipc public (long Position, long Size) GetBufferType0x22() { - if (RecvListBuff.Count > 0 && RecvListBuff[0].Position != 0 && RecvListBuff[0].Size != 0) + if (RecvListBuff.Count != 0 && + RecvListBuff[0].Position != 0 && + RecvListBuff[0].Size != 0) { return (RecvListBuff[0].Position, RecvListBuff[0].Size); } - if (ReceiveBuff.Count > 0 && ReceiveBuff[0].Position != 0 && ReceiveBuff[0].Size != 0) + if (ReceiveBuff.Count != 0 && + ReceiveBuff[0].Position != 0 && + ReceiveBuff[0].Size != 0) { return (ReceiveBuff[0].Position, ReceiveBuff[0].Size); } diff --git a/Ryujinx.Core/OsHle/Services/Nv/INvDrvServices.cs b/Ryujinx.Core/OsHle/Services/Nv/INvDrvServices.cs index 16acf59206..d67a6088dc 100644 --- a/Ryujinx.Core/OsHle/Services/Nv/INvDrvServices.cs +++ b/Ryujinx.Core/OsHle/Services/Nv/INvDrvServices.cs @@ -139,7 +139,7 @@ namespace Ryujinx.Core.OsHle.Services.Nv return 0; } - + public long FinishInitialize(ServiceCtx Context) { Context.Ns.Log.PrintStub(LogClass.ServiceNv, "Stubbed."); diff --git a/Ryujinx.Core/OsHle/Services/Vi/IHOSBinderDriver.cs b/Ryujinx.Core/OsHle/Services/Vi/IHOSBinderDriver.cs index 72e8ef1980..c00e247e29 100644 --- a/Ryujinx.Core/OsHle/Services/Vi/IHOSBinderDriver.cs +++ b/Ryujinx.Core/OsHle/Services/Vi/IHOSBinderDriver.cs @@ -48,16 +48,12 @@ namespace Ryujinx.Core.OsHle.Services.Vi return Flinger.ProcessParcelRequest(Context, Data, Code); } - //TransactParcelAuto(i32, u32, u32, buffer) -> buffer - //Buffer C (PtrBuff) and X (ReceiveListBuff) can be used here... - //But they are all null during all my tests. public long TransactParcelAuto(ServiceCtx Context) { int Id = Context.RequestData.ReadInt32(); int Code = Context.RequestData.ReadInt32(); - long DataPos = Context.Request.SendBuff[0].Position; - long DataSize = Context.Request.SendBuff[0].Size; + (long DataPos, long DataSize) = Context.Request.GetBufferType0x21(); byte[] Data = AMemoryHelper.ReadBytes(Context.Memory, DataPos, DataSize);