From e52306ca6086ca017b86d2ed98d6015592b00549 Mon Sep 17 00:00:00 2001 From: Zach Hilman Date: Fri, 28 Jun 2019 22:46:00 -0400 Subject: apm: Implement SetCpuBoostMode --- src/core/hle/service/apm/interface.cpp | 12 ++++++++++++ src/core/hle/service/apm/interface.h | 2 ++ 2 files changed, 14 insertions(+) diff --git a/src/core/hle/service/apm/interface.cpp b/src/core/hle/service/apm/interface.cpp index b2241366f..06f0f8edd 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(controller); } +void APM_Sys::SetCpuBoostMode(Kernel::HLERequestContext& ctx) { + IPC::RequestParser rp{ctx}; + const auto mode = rp.PopEnum(); + + LOG_DEBUG(Service_APM, "called, mode={:08X}", static_cast(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 6d5fdf8ef..de1b89437 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); -- cgit v1.2.3