summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGravatar Zach Hilman2019-06-28 22:46:00 -0400
committerGravatar Zach Hilman2019-06-28 22:46:00 -0400
commite52306ca6086ca017b86d2ed98d6015592b00549 (patch)
tree4e9727d4ca1d874329930dbab8e507f5958f2aae /src
parentapm: Add getters for performance config and mode (diff)
downloadyuzu-e52306ca6086ca017b86d2ed98d6015592b00549.tar.gz
yuzu-e52306ca6086ca017b86d2ed98d6015592b00549.tar.xz
yuzu-e52306ca6086ca017b86d2ed98d6015592b00549.zip
apm: Implement SetCpuBoostMode
Diffstat (limited to 'src')
-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) {
104 rb.PushIpcInterface<ISession>(controller); 104 rb.PushIpcInterface<ISession>(controller);
105} 105}
106 106
107void APM_Sys::SetCpuBoostMode(Kernel::HLERequestContext& ctx) {
108 IPC::RequestParser rp{ctx};
109 const auto mode = rp.PopEnum<CpuBoostMode>();
110
111 LOG_DEBUG(Service_APM, "called, mode={:08X}", static_cast<u32>(mode));
112
113 controller.SetFromCpuBoostMode(mode);
114
115 IPC::ResponseBuilder rb{ctx, 2};
116 rb.Push(RESULT_SUCCESS);
117}
118
107void APM_Sys::GetCurrentPerformanceConfiguration(Kernel::HLERequestContext& ctx) { 119void APM_Sys::GetCurrentPerformanceConfiguration(Kernel::HLERequestContext& ctx) {
108 LOG_DEBUG(Service_APM, "called"); 120 LOG_DEBUG(Service_APM, "called");
109 121
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:
29 explicit APM_Sys(Controller& controller); 29 explicit APM_Sys(Controller& controller);
30 ~APM_Sys() override; 30 ~APM_Sys() override;
31 31
32 void SetCpuBoostMode(Kernel::HLERequestContext& ctx);
33
32private: 34private:
33 void GetPerformanceEvent(Kernel::HLERequestContext& ctx); 35 void GetPerformanceEvent(Kernel::HLERequestContext& ctx);
34 void GetCurrentPerformanceConfiguration(Kernel::HLERequestContext& ctx); 36 void GetCurrentPerformanceConfiguration(Kernel::HLERequestContext& ctx);