summaryrefslogtreecommitdiffstats
path: root/src/core/hle/service/apm
diff options
context:
space:
mode:
authorZach Hilman <zachhilman@gmail.com>2019-06-29 04:46:00 +0200
committerZach Hilman <zachhilman@gmail.com>2019-06-29 04:46:00 +0200
commite52306ca6086ca017b86d2ed98d6015592b00549 (patch)
tree4e9727d4ca1d874329930dbab8e507f5958f2aae /src/core/hle/service/apm
parentapm: Add getters for performance config and mode (diff)
downloadyuzu-e52306ca6086ca017b86d2ed98d6015592b00549.tar
yuzu-e52306ca6086ca017b86d2ed98d6015592b00549.tar.gz
yuzu-e52306ca6086ca017b86d2ed98d6015592b00549.tar.bz2
yuzu-e52306ca6086ca017b86d2ed98d6015592b00549.tar.lz
yuzu-e52306ca6086ca017b86d2ed98d6015592b00549.tar.xz
yuzu-e52306ca6086ca017b86d2ed98d6015592b00549.tar.zst
yuzu-e52306ca6086ca017b86d2ed98d6015592b00549.zip
Diffstat (limited to 'src/core/hle/service/apm')
-rw-r--r--src/core/hle/service/apm/interface.cpp12
-rw-r--r--src/core/hle/service/apm/interface.h2
2 files changed, 14 insertions, 0 deletions
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<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 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);