diff --git a/src/core/hle/service/apm/interface.cpp b/src/core/hle/service/apm/interface.cpp index b2241366f538fc7f8c97b50d9cd589a883302088..06f0f8edd7411dbd9e98e96369b13783349c4368 100644 --- a/src/core/hle/service/apm/interface.cpp +++ b/src/core/hle/service/apm/interface.cpp @@ -104,6 +104,18 @@ void APM_Sys::GetPerformanceEvent(Kernel::HLERequestContext& ctx) { rb.PushIpcInterface<ISession>(controller); } +void APM_Sys::SetCpuBoostMode(Kernel::HLERequestContext& ctx) { + IPC::RequestParser rp{ctx}; + const auto mode = rp.PopEnum<CpuBoostMode>(); + + LOG_DEBUG(Service_APM, "called, mode={:08X}", static_cast<u32>(mode)); + + controller.SetFromCpuBoostMode(mode); + + IPC::ResponseBuilder rb{ctx, 2}; + rb.Push(RESULT_SUCCESS); +} + void APM_Sys::GetCurrentPerformanceConfiguration(Kernel::HLERequestContext& ctx) { LOG_DEBUG(Service_APM, "called"); diff --git a/src/core/hle/service/apm/interface.h b/src/core/hle/service/apm/interface.h index 6d5fdf8ef2ada969dc7a414434056a94764f86da..de1b8943792c91e2f85afc4c80e588d206e60a29 100644 --- a/src/core/hle/service/apm/interface.h +++ b/src/core/hle/service/apm/interface.h @@ -29,6 +29,8 @@ public: explicit APM_Sys(Controller& controller); ~APM_Sys() override; + void SetCpuBoostMode(Kernel::HLERequestContext& ctx); + private: void GetPerformanceEvent(Kernel::HLERequestContext& ctx); void GetCurrentPerformanceConfiguration(Kernel::HLERequestContext& ctx);