mirror of
https://github.com/Ryujinx/Ryujinx.git
synced 2024-11-24 06:32:01 +00:00
Use GetBufferType0x21 on TransactParcelAuto aswell
This commit is contained in:
parent
250e2084f4
commit
e7efee7909
3 changed files with 14 additions and 10 deletions
|
@ -176,12 +176,16 @@ namespace Ryujinx.Core.OsHle.Ipc
|
||||||
|
|
||||||
public (long Position, long Size) GetBufferType0x21()
|
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);
|
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);
|
return (SendBuff[0].Position, SendBuff[0].Size);
|
||||||
}
|
}
|
||||||
|
@ -191,12 +195,16 @@ namespace Ryujinx.Core.OsHle.Ipc
|
||||||
|
|
||||||
public (long Position, long Size) GetBufferType0x22()
|
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);
|
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);
|
return (ReceiveBuff[0].Position, ReceiveBuff[0].Size);
|
||||||
}
|
}
|
||||||
|
|
|
@ -48,16 +48,12 @@ namespace Ryujinx.Core.OsHle.Services.Vi
|
||||||
return Flinger.ProcessParcelRequest(Context, Data, Code);
|
return Flinger.ProcessParcelRequest(Context, Data, Code);
|
||||||
}
|
}
|
||||||
|
|
||||||
//TransactParcelAuto(i32, u32, u32, buffer<unknown, 0x21, 0>) -> buffer<unknown, 0x22, 0>
|
|
||||||
//Buffer C (PtrBuff) and X (ReceiveListBuff) can be used here...
|
|
||||||
//But they are all null during all my tests.
|
|
||||||
public long TransactParcelAuto(ServiceCtx Context)
|
public long TransactParcelAuto(ServiceCtx Context)
|
||||||
{
|
{
|
||||||
int Id = Context.RequestData.ReadInt32();
|
int Id = Context.RequestData.ReadInt32();
|
||||||
int Code = Context.RequestData.ReadInt32();
|
int Code = Context.RequestData.ReadInt32();
|
||||||
|
|
||||||
long DataPos = Context.Request.SendBuff[0].Position;
|
(long DataPos, long DataSize) = Context.Request.GetBufferType0x21();
|
||||||
long DataSize = Context.Request.SendBuff[0].Size;
|
|
||||||
|
|
||||||
byte[] Data = AMemoryHelper.ReadBytes(Context.Memory, DataPos, DataSize);
|
byte[] Data = AMemoryHelper.ReadBytes(Context.Memory, DataPos, DataSize);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue