From a3964732019bb8bee28a8944303552adf6eca075 Mon Sep 17 00:00:00 2001 From: Morph <39850852+Morph1984@users.noreply.github.com> Date: Thu, 20 Jan 2022 10:59:59 -0500 Subject: service: apm: Stub ISession SetCpuOverclockEnabled Since we don't currently support CPU overclocking within the emulated system, this can be stubbed for now, like APM IsCpuOverclockEnabled. - Used by Gravity Rider Zero --- src/core/hle/service/apm/apm_interface.cpp | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'src/core/hle/service/apm') diff --git a/src/core/hle/service/apm/apm_interface.cpp b/src/core/hle/service/apm/apm_interface.cpp index e58bad083..6163e3294 100644 --- a/src/core/hle/service/apm/apm_interface.cpp +++ b/src/core/hle/service/apm/apm_interface.cpp @@ -17,7 +17,7 @@ public: static const FunctionInfo functions[] = { {0, &ISession::SetPerformanceConfiguration, "SetPerformanceConfiguration"}, {1, &ISession::GetPerformanceConfiguration, "GetPerformanceConfiguration"}, - {2, nullptr, "SetCpuOverclockEnabled"}, + {2, &ISession::SetCpuOverclockEnabled, "SetCpuOverclockEnabled"}, }; RegisterHandlers(functions); } @@ -47,6 +47,18 @@ private: rb.PushEnum(controller.GetCurrentPerformanceConfiguration(mode)); } + void SetCpuOverclockEnabled(Kernel::HLERequestContext& ctx) { + IPC::RequestParser rp{ctx}; + + const auto cpu_overclock_enabled = rp.Pop(); + + LOG_WARNING(Service_APM, "(STUBBED) called, cpu_overclock_enabled={}", + cpu_overclock_enabled); + + IPC::ResponseBuilder rb{ctx, 2}; + rb.Push(ResultSuccess); + } + Controller& controller; }; -- cgit v1.2.3