SystemManagerServer.cs 933 B

12345678910111213141516171819202122232425262728
  1. namespace Ryujinx.HLE.HOS.Services.Apm
  2. {
  3. [Service("apm:sys")]
  4. class SystemManagerServer : ISystemManager
  5. {
  6. private readonly ServiceCtx _context;
  7. public SystemManagerServer(ServiceCtx context) : base(context)
  8. {
  9. _context = context;
  10. }
  11. protected override void RequestPerformanceMode(PerformanceMode performanceMode)
  12. {
  13. _context.Device.System.PerformanceState.PerformanceMode = performanceMode;
  14. }
  15. internal override void SetCpuBoostMode(CpuBoostMode cpuBoostMode)
  16. {
  17. _context.Device.System.PerformanceState.CpuBoostMode = cpuBoostMode;
  18. }
  19. protected override PerformanceConfiguration GetCurrentPerformanceConfiguration()
  20. {
  21. return _context.Device.System.PerformanceState.GetCurrentPerformanceConfiguration(_context.Device.System.PerformanceState.PerformanceMode);
  22. }
  23. }
  24. }