mirror of
https://git.naxdy.org/Mirror/Ryujinx.git
synced 2024-12-28 11:33:06 +00:00
Implement IApplicationCreator & IApplicationAccessor & IAppletAccessor
This commit is contained in:
parent
98e6a34608
commit
f2ff0fd89d
4 changed files with 140 additions and 2 deletions
68
Ryujinx.Core/OsHle/Services/Am/IAppletAccessor.cs
Normal file
68
Ryujinx.Core/OsHle/Services/Am/IAppletAccessor.cs
Normal file
|
@ -0,0 +1,68 @@
|
|||
using Ryujinx.Core.Logging;
|
||||
using Ryujinx.Core.OsHle.Ipc;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Ryujinx.Core.OsHle.Services.Am
|
||||
{
|
||||
class IAppletAccessor : IpcService
|
||||
{
|
||||
private Dictionary<int, ServiceProcessRequest> m_Commands;
|
||||
|
||||
public override IReadOnlyDictionary<int, ServiceProcessRequest> Commands => m_Commands;
|
||||
|
||||
public IAppletAccessor()
|
||||
{
|
||||
m_Commands = new Dictionary<int, ServiceProcessRequest>()
|
||||
{
|
||||
{ 0, GetAppletStateChangedEvent },
|
||||
{ 1, IsCompleted },
|
||||
{ 10, Start },
|
||||
{ 20, RequestExit },
|
||||
{ 25, Terminate },
|
||||
{ 30, GetResult }
|
||||
};
|
||||
}
|
||||
|
||||
public long GetAppletStateChangedEvent(ServiceCtx Context)
|
||||
{
|
||||
Context.Ns.Log.PrintStub(LogClass.ServiceAm, "Stubbed.");
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
public long IsCompleted(ServiceCtx Context)
|
||||
{
|
||||
Context.Ns.Log.PrintStub(LogClass.ServiceAm, "Stubbed.");
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
public long Start(ServiceCtx Context)
|
||||
{
|
||||
Context.Ns.Log.PrintStub(LogClass.ServiceAm, "Stubbed.");
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
public long RequestExit(ServiceCtx Context)
|
||||
{
|
||||
Context.Ns.Log.PrintStub(LogClass.ServiceAm, "Stubbed.");
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
public long Terminate(ServiceCtx Context)
|
||||
{
|
||||
Context.Ns.Log.PrintStub(LogClass.ServiceAm, "Stubbed.");
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
public long GetResult(ServiceCtx Context)
|
||||
{
|
||||
Context.Ns.Log.PrintStub(LogClass.ServiceAm, "Stubbed.");
|
||||
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
}
|
36
Ryujinx.Core/OsHle/Services/Am/IApplicationAccessor.cs
Normal file
36
Ryujinx.Core/OsHle/Services/Am/IApplicationAccessor.cs
Normal file
|
@ -0,0 +1,36 @@
|
|||
using Ryujinx.Core.Logging;
|
||||
using Ryujinx.Core.OsHle.Ipc;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Ryujinx.Core.OsHle.Services.Am
|
||||
{
|
||||
class IApplicationAccessor : IpcService
|
||||
{
|
||||
private Dictionary<int, ServiceProcessRequest> m_Commands;
|
||||
|
||||
public override IReadOnlyDictionary<int, ServiceProcessRequest> Commands => m_Commands;
|
||||
|
||||
public IApplicationAccessor()
|
||||
{
|
||||
m_Commands = new Dictionary<int, ServiceProcessRequest>()
|
||||
{
|
||||
{ 112, GetCurrentLibraryApplet },
|
||||
{ 121, PushLaunchParameter }
|
||||
};
|
||||
}
|
||||
|
||||
public long GetCurrentLibraryApplet(ServiceCtx Context)
|
||||
{
|
||||
MakeObject(Context, new IAppletAccessor());
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
public long PushLaunchParameter(ServiceCtx Context)
|
||||
{
|
||||
Context.Ns.Log.PrintStub(LogClass.ServiceAm, "Stubbed.");
|
||||
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -13,8 +13,39 @@ namespace Ryujinx.HLE.OsHle.Services.Am
|
|||
{
|
||||
m_Commands = new Dictionary<int, ServiceProcessRequest>()
|
||||
{
|
||||
//...
|
||||
{ 0, CreateApplication },
|
||||
{ 1, PopLaunchRequestedApplication },
|
||||
{ 10, CreateSystemApplication },
|
||||
{ 100, PopFloatingApplicationForDevelopment }
|
||||
};
|
||||
}
|
||||
|
||||
public long CreateApplication(ServiceCtx Context)
|
||||
{
|
||||
MakeObject(Context, new IApplicationAccessor());
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
public long PopLaunchRequestedApplication(ServiceCtx Context)
|
||||
{
|
||||
MakeObject(Context, new IApplicationAccessor());
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
public long CreateSystemApplication(ServiceCtx Context)
|
||||
{
|
||||
MakeObject(Context, new IApplicationAccessor());
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
public long PopFloatingApplicationForDevelopment(ServiceCtx Context)
|
||||
{
|
||||
MakeObject(Context, new IApplicationAccessor());
|
||||
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -100,6 +100,9 @@ namespace Ryujinx.HLE.OsHle.Services.Am
|
|||
|
||||
public long InitializeGamePlayRecording(ServiceCtx Context)
|
||||
{
|
||||
//TODO: add a TransferMemory Handle
|
||||
long Size = Context.RequestData.ReadInt64();
|
||||
|
||||
Context.Ns.Log.PrintStub(LogClass.ServiceAm, "Stubbed.");
|
||||
|
||||
return 0;
|
||||
|
|
Loading…
Reference in a new issue