Implement GetImageBaseSize, LoadImage on IProfile

This commit is contained in:
Lordmau5 2018-06-11 01:44:34 +02:00
parent 518fe799da
commit 1c365ed04c

View file

@ -1,3 +1,4 @@
using ChocolArm64.Memory;
using Ryujinx.Core.Logging;
using Ryujinx.Core.OsHle.Ipc;
using System.Collections.Generic;
@ -10,11 +11,15 @@ namespace Ryujinx.Core.OsHle.Services.Acc
public override IReadOnlyDictionary<int, ServiceProcessRequest> Commands => m_Commands;
private byte[] profile_image = { };
public IProfile()
{
m_Commands = new Dictionary<int, ServiceProcessRequest>()
{
{ 1, GetBase }
{ 1, GetBase },
{ 10, GetImageSize },
{ 11, LoadImage }
};
}
@ -32,5 +37,26 @@ namespace Ryujinx.Core.OsHle.Services.Acc
return 0;
}
public long GetImageSize(ServiceCtx Context)
{
Context.Ns.Log.PrintStub(LogClass.ServiceAcc, "Stubbed.");
Context.ResponseData.Write(profile_image.Length);
return 0;
}
public long LoadImage(ServiceCtx Context)
{
Context.Ns.Log.PrintStub(LogClass.ServiceAcc, "Stubbed.");
(long Position, long Size) = Context.Request.GetBufferType0x22();
Context.ResponseData.Write(profile_image.Length);
Context.Memory.WriteBytes(Position, profile_image);
return 0;
}
}
}