ManagerServer.cs 830 B

12345678910111213141516171819202122232425262728293031
  1. namespace Ryujinx.HLE.HOS.Services.Apm
  2. {
  3. [Service("apm")]
  4. [Service("apm:am")] // 8.0.0+
  5. class ManagerServer : IManager
  6. {
  7. private readonly ServiceCtx _context;
  8. public ManagerServer(ServiceCtx context) : base(context)
  9. {
  10. _context = context;
  11. }
  12. protected override ResultCode OpenSession(out SessionServer sessionServer)
  13. {
  14. sessionServer = new SessionServer(_context);
  15. return ResultCode.Success;
  16. }
  17. protected override PerformanceMode GetPerformanceMode()
  18. {
  19. return _context.Device.System.PerformanceState.PerformanceMode;
  20. }
  21. protected override bool IsCpuOverclockEnabled()
  22. {
  23. return _context.Device.System.PerformanceState.CpuOverclockEnabled;
  24. }
  25. }
  26. }