This commit is contained in:
emmaus 2018-10-03 20:17:05 +00:00
parent abd741c626
commit f4ed327722
2 changed files with 52 additions and 0 deletions

View file

@ -0,0 +1,48 @@
using Ryujinx.HLE.HOS.Ipc;
using Ryujinx.HLE.HOS.Kernel;
using Ryujinx.HLE.Logging;
using System;
using System.Collections.Generic;
namespace Ryujinx.HLE.HOS.Services.Irs
{
class IIrSensorServer : IpcService
{
private Dictionary<int, ServiceProcessRequest> m_Commands;
public override IReadOnlyDictionary<int, ServiceProcessRequest> Commands => m_Commands;
private bool Activated;
public IIrSensorServer()
{
m_Commands = new Dictionary<int, ServiceProcessRequest>()
{
{ 302, ActivateIrsensor },
{ 303, DeactivateIrsensor }
};
}
public long ActivateIrsensor(ServiceCtx Context)
{
long AppletResourceUserId = Context.RequestData.ReadInt64();
int IrsSensorHandle = Context.RequestData.ReadInt32();
Context.Device.Log.PrintStub(LogClass.ServiceHid, $"Stubbed. AppletResourceUserId: {AppletResourceUserId} - " +
$"IrsSensorHandle: {IrsSensorHandle}");
return 0;
}
public long DeactivateIrsensor(ServiceCtx Context)
{
long AppletResourceUserId = Context.RequestData.ReadInt64();
int IrsSensorHandle = Context.RequestData.ReadInt32();
Context.Device.Log.PrintStub(LogClass.ServiceHid, $"Stubbed. AppletResourceUserId: {AppletResourceUserId} - " +
$"IrsSensorHandle: {IrsSensorHandle}");
return 0;
}
}
}

View file

@ -6,6 +6,7 @@ using Ryujinx.HLE.HOS.Services.Bsd;
using Ryujinx.HLE.HOS.Services.Caps;
using Ryujinx.HLE.HOS.Services.FspSrv;
using Ryujinx.HLE.HOS.Services.Hid;
using Ryujinx.HLE.HOS.Services.Irs;
using Ryujinx.HLE.HOS.Services.Lm;
using Ryujinx.HLE.HOS.Services.Mm;
using Ryujinx.HLE.HOS.Services.Nfp;
@ -96,6 +97,9 @@ namespace Ryujinx.HLE.HOS.Services
case "hid":
return new IHidServer(System);
case "irs":
return new IIrSensorServer();
case "lm":
return new ILogService();