ISelfController.cs 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. using Ryujinx.OsHle.Ipc;
  2. using System.Collections.Generic;
  3. namespace Ryujinx.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. { 11, SetOperationModeChangedNotification },
  14. { 12, SetPerformanceModeChangedNotification },
  15. { 13, SetFocusHandlingMode },
  16. { 16, SetOutOfFocusSuspendingEnabled }
  17. };
  18. }
  19. public long SetOperationModeChangedNotification(ServiceCtx Context)
  20. {
  21. bool Enable = Context.RequestData.ReadByte() != 0 ? true : false;
  22. return 0;
  23. }
  24. public long SetPerformanceModeChangedNotification(ServiceCtx Context)
  25. {
  26. bool Enable = Context.RequestData.ReadByte() != 0 ? true : false;
  27. return 0;
  28. }
  29. public long SetFocusHandlingMode(ServiceCtx Context)
  30. {
  31. bool Flag1 = Context.RequestData.ReadByte() != 0 ? true : false;
  32. bool Flag2 = Context.RequestData.ReadByte() != 0 ? true : false;
  33. bool Flag3 = Context.RequestData.ReadByte() != 0 ? true : false;
  34. return 0;
  35. }
  36. public long SetOutOfFocusSuspendingEnabled(ServiceCtx Context)
  37. {
  38. bool Enable = Context.RequestData.ReadByte() != 0 ? true : false;
  39. return 0;
  40. }
  41. }
  42. }