IIrSensorServer.cs 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. using Ryujinx.Common.Logging;
  2. using Ryujinx.HLE.HOS.Ipc;
  3. using System.Collections.Generic;
  4. namespace Ryujinx.HLE.HOS.Services.Irs
  5. {
  6. class IIrSensorServer : IpcService
  7. {
  8. private Dictionary<int, ServiceProcessRequest> _commands;
  9. public override IReadOnlyDictionary<int, ServiceProcessRequest> Commands => _commands;
  10. private bool _activated;
  11. public IIrSensorServer()
  12. {
  13. _commands = new Dictionary<int, ServiceProcessRequest>
  14. {
  15. { 302, ActivateIrsensor },
  16. { 303, DeactivateIrsensor }
  17. };
  18. }
  19. // ActivateIrsensor(nn::applet::AppletResourceUserId, pid)
  20. public long ActivateIrsensor(ServiceCtx context)
  21. {
  22. long appletResourceUserId = context.RequestData.ReadInt64();
  23. Logger.PrintStub(LogClass.ServiceIrs, new { appletResourceUserId });
  24. return 0;
  25. }
  26. // DeactivateIrsensor(nn::applet::AppletResourceUserId, pid)
  27. public long DeactivateIrsensor(ServiceCtx context)
  28. {
  29. long appletResourceUserId = context.RequestData.ReadInt64();
  30. Logger.PrintStub(LogClass.ServiceIrs, new { appletResourceUserId });
  31. return 0;
  32. }
  33. }
  34. }