2018-10-17 19:15:50 +02:00
|
|
|
|
using Ryujinx.Common.Logging;
|
|
|
|
|
using Ryujinx.HLE.HOS.Ipc;
|
2018-10-07 17:12:11 +02:00
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
|
|
|
|
|
namespace Ryujinx.HLE.HOS.Services.Irs
|
|
|
|
|
{
|
|
|
|
|
class IIrSensorServer : IpcService
|
|
|
|
|
{
|
2018-12-05 01:52:39 +01:00
|
|
|
|
private Dictionary<int, ServiceProcessRequest> m_Commands;
|
2018-10-07 17:12:11 +02:00
|
|
|
|
|
2018-12-05 01:52:39 +01:00
|
|
|
|
public override IReadOnlyDictionary<int, ServiceProcessRequest> Commands => m_Commands;
|
2018-10-07 17:12:11 +02:00
|
|
|
|
|
2018-12-05 01:52:39 +01:00
|
|
|
|
private bool Activated;
|
2018-10-07 17:12:11 +02:00
|
|
|
|
|
|
|
|
|
public IIrSensorServer()
|
|
|
|
|
{
|
2018-12-05 01:52:39 +01:00
|
|
|
|
m_Commands = new Dictionary<int, ServiceProcessRequest>()
|
2018-10-07 17:12:11 +02:00
|
|
|
|
{
|
|
|
|
|
{ 302, ActivateIrsensor },
|
|
|
|
|
{ 303, DeactivateIrsensor }
|
|
|
|
|
};
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// ActivateIrsensor(nn::applet::AppletResourceUserId, pid)
|
2018-12-05 01:52:39 +01:00
|
|
|
|
public long ActivateIrsensor(ServiceCtx Context)
|
2018-10-07 17:12:11 +02:00
|
|
|
|
{
|
2018-12-05 01:52:39 +01:00
|
|
|
|
long AppletResourceUserId = Context.RequestData.ReadInt64();
|
2018-10-07 17:12:11 +02:00
|
|
|
|
|
2018-12-05 01:52:39 +01:00
|
|
|
|
Logger.PrintStub(LogClass.ServiceIrs, $"Stubbed. AppletResourceUserId: {AppletResourceUserId}");
|
2018-10-07 17:12:11 +02:00
|
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// DeactivateIrsensor(nn::applet::AppletResourceUserId, pid)
|
2018-12-05 01:52:39 +01:00
|
|
|
|
public long DeactivateIrsensor(ServiceCtx Context)
|
2018-10-07 17:12:11 +02:00
|
|
|
|
{
|
2018-12-05 01:52:39 +01:00
|
|
|
|
long AppletResourceUserId = Context.RequestData.ReadInt64();
|
2018-10-07 17:12:11 +02:00
|
|
|
|
|
2018-12-05 01:52:39 +01:00
|
|
|
|
Logger.PrintStub(LogClass.ServiceIrs, $"Stubbed. AppletResourceUserId: {AppletResourceUserId}");
|
2018-10-07 17:12:11 +02:00
|
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|