diff options
Diffstat (limited to 'Ryujinx.HLE/HOS/Services/Am')
| -rw-r--r-- | Ryujinx.HLE/HOS/Services/Am/ICommonStateGetter.cs | 21 | ||||
| -rw-r--r-- | Ryujinx.HLE/HOS/Services/Am/ResultCode.cs | 3 |
2 files changed, 23 insertions, 1 deletions
diff --git a/Ryujinx.HLE/HOS/Services/Am/ICommonStateGetter.cs b/Ryujinx.HLE/HOS/Services/Am/ICommonStateGetter.cs index 59474126..44421b30 100644 --- a/Ryujinx.HLE/HOS/Services/Am/ICommonStateGetter.cs +++ b/Ryujinx.HLE/HOS/Services/Am/ICommonStateGetter.cs @@ -10,6 +10,8 @@ namespace Ryujinx.HLE.HOS.Services.Am { private KEvent _displayResolutionChangeEvent; + private Apm.CpuBoostMode _cpuBoostMode = Apm.CpuBoostMode.Disabled; + public ICommonStateGetter(Horizon system) { _displayResolutionChangeEvent = new KEvent(system); @@ -116,5 +118,24 @@ namespace Ryujinx.HLE.HOS.Services.Am return ResultCode.Success; } + + [Command(66)] // 6.0.0+ + // SetCpuBoostMode(u32 cpu_boost_mode) + public ResultCode SetCpuBoostMode(ServiceCtx context) + { + uint cpuBoostMode = context.RequestData.ReadUInt32(); + + if (cpuBoostMode > 1) + { + return ResultCode.CpuBoostModeInvalid; + } + + _cpuBoostMode = (Apm.CpuBoostMode)cpuBoostMode; + + // NOTE: There is a condition variable after the assignment, probably waiting something with apm:sys service (SetCpuBoostMode call?). + // Since we will probably never support CPU boost things, it's not needed to implement more. + + return ResultCode.Success; + } } }
\ No newline at end of file diff --git a/Ryujinx.HLE/HOS/Services/Am/ResultCode.cs b/Ryujinx.HLE/HOS/Services/Am/ResultCode.cs index 3fc76ae6..b46bd2b3 100644 --- a/Ryujinx.HLE/HOS/Services/Am/ResultCode.cs +++ b/Ryujinx.HLE/HOS/Services/Am/ResultCode.cs @@ -7,6 +7,7 @@ namespace Ryujinx.HLE.HOS.Services.Am Success = 0, - NoMessages = (3 << ErrorCodeShift) | ModuleId + NoMessages = (3 << ErrorCodeShift) | ModuleId, + CpuBoostModeInvalid = (506 << ErrorCodeShift) | ModuleId } }
\ No newline at end of file |
