ISession.cs 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. using Ryujinx.Core.OsHle.Ipc;
  2. using System.Collections.Generic;
  3. namespace Ryujinx.Core.OsHle.Services.Apm
  4. {
  5. class ISession : IpcService
  6. {
  7. private Dictionary<int, ServiceProcessRequest> m_Commands;
  8. public override IReadOnlyDictionary<int, ServiceProcessRequest> Commands => m_Commands;
  9. public ISession()
  10. {
  11. m_Commands = new Dictionary<int, ServiceProcessRequest>()
  12. {
  13. { 0, SetPerformanceConfiguration },
  14. { 1, GetPerformanceConfiguration }
  15. };
  16. }
  17. public long SetPerformanceConfiguration(ServiceCtx Context)
  18. {
  19. PerformanceMode PerfMode = (PerformanceMode)Context.RequestData.ReadInt32();
  20. PerformanceConfiguration PerfConfig = (PerformanceConfiguration)Context.RequestData.ReadInt32();
  21. return 0;
  22. }
  23. public long GetPerformanceConfiguration(ServiceCtx Context)
  24. {
  25. PerformanceMode PerfMode = (PerformanceMode)Context.RequestData.ReadInt32();
  26. Context.ResponseData.Write((uint)PerformanceConfiguration.PerformanceConfiguration1);
  27. return 0;
  28. }
  29. }
  30. }