ISession.cs 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. using Ryujinx.Common.Logging;
  2. using Ryujinx.HLE.HOS.Ipc;
  3. using System.Collections.Generic;
  4. namespace Ryujinx.HLE.HOS.Services.Apm
  5. {
  6. class ISession : IpcService
  7. {
  8. private Dictionary<int, ServiceProcessRequest> _commands;
  9. public override IReadOnlyDictionary<int, ServiceProcessRequest> Commands => _commands;
  10. public ISession()
  11. {
  12. _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. Logger.PrintStub(LogClass.ServiceApm);
  29. return 0;
  30. }
  31. }
  32. }