diff options
| author | 2019-06-28 22:46:00 -0400 | |
|---|---|---|
| committer | 2019-06-28 22:46:00 -0400 | |
| commit | e52306ca6086ca017b86d2ed98d6015592b00549 (patch) | |
| tree | 4e9727d4ca1d874329930dbab8e507f5958f2aae /src | |
| parent | apm: Add getters for performance config and mode (diff) | |
| download | yuzu-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.cpp | 12 | ||||
| -rw-r--r-- | src/core/hle/service/apm/interface.h | 2 |
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 | ||
| 107 | void 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 | |||
| 107 | void APM_Sys::GetCurrentPerformanceConfiguration(Kernel::HLERequestContext& ctx) { | 119 | void 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 | |||
| 32 | private: | 34 | private: |
| 33 | void GetPerformanceEvent(Kernel::HLERequestContext& ctx); | 35 | void GetPerformanceEvent(Kernel::HLERequestContext& ctx); |
| 34 | void GetCurrentPerformanceConfiguration(Kernel::HLERequestContext& ctx); | 36 | void GetCurrentPerformanceConfiguration(Kernel::HLERequestContext& ctx); |