ISession.cs 1.3 KB

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