ISelfController.cs 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. using Ryujinx.Core.OsHle.Ipc;
  2. using System.Collections.Generic;
  3. namespace Ryujinx.Core.OsHle.Objects.Am
  4. {
  5. class ISelfController : IIpcInterface
  6. {
  7. private Dictionary<int, ServiceProcessRequest> m_Commands;
  8. public IReadOnlyDictionary<int, ServiceProcessRequest> Commands => m_Commands;
  9. public ISelfController()
  10. {
  11. m_Commands = new Dictionary<int, ServiceProcessRequest>()
  12. {
  13. { 10, SetScreenShotPermission },
  14. { 11, SetOperationModeChangedNotification },
  15. { 12, SetPerformanceModeChangedNotification },
  16. { 13, SetFocusHandlingMode },
  17. { 16, SetOutOfFocusSuspendingEnabled }
  18. };
  19. }
  20. public long SetScreenShotPermission(ServiceCtx Context)
  21. {
  22. bool Enable = Context.RequestData.ReadByte() != 0 ? true : false;
  23. return 0;
  24. }
  25. public long SetOperationModeChangedNotification(ServiceCtx Context)
  26. {
  27. bool Enable = Context.RequestData.ReadByte() != 0 ? true : false;
  28. return 0;
  29. }
  30. public long SetPerformanceModeChangedNotification(ServiceCtx Context)
  31. {
  32. bool Enable = Context.RequestData.ReadByte() != 0 ? true : false;
  33. return 0;
  34. }
  35. public long SetFocusHandlingMode(ServiceCtx Context)
  36. {
  37. bool Flag1 = Context.RequestData.ReadByte() != 0 ? true : false;
  38. bool Flag2 = Context.RequestData.ReadByte() != 0 ? true : false;
  39. bool Flag3 = Context.RequestData.ReadByte() != 0 ? true : false;
  40. return 0;
  41. }
  42. public long SetOutOfFocusSuspendingEnabled(ServiceCtx Context)
  43. {
  44. bool Enable = Context.RequestData.ReadByte() != 0 ? true : false;
  45. return 0;
  46. }
  47. }
  48. }