From 141d929929c01d2f1baed19bcf526c9a7dce2897 Mon Sep 17 00:00:00 2001 From: Lioncash Date: Thu, 17 Oct 2019 15:58:22 -0400 Subject: [PATCH] apm/controller: Make GetCurrentPerformanceMode() a const member function This doesn't modify instance state, so it can be made const qualified. --- src/core/hle/service/apm/controller.cpp | 2 +- src/core/hle/service/apm/controller.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/core/hle/service/apm/controller.cpp b/src/core/hle/service/apm/controller.cpp index 073d0f6fa..d9e8d247d 100644 --- a/src/core/hle/service/apm/controller.cpp +++ b/src/core/hle/service/apm/controller.cpp @@ -48,7 +48,7 @@ void Controller::SetFromCpuBoostMode(CpuBoostMode mode) { BOOST_MODE_TO_CONFIG_MAP.at(static_cast(mode))); } -PerformanceMode Controller::GetCurrentPerformanceMode() { +PerformanceMode Controller::GetCurrentPerformanceMode() const { return Settings::values.use_docked_mode ? PerformanceMode::Docked : PerformanceMode::Handheld; } diff --git a/src/core/hle/service/apm/controller.h b/src/core/hle/service/apm/controller.h index 454caa6eb..af0c4cd34 100644 --- a/src/core/hle/service/apm/controller.h +++ b/src/core/hle/service/apm/controller.h @@ -56,7 +56,7 @@ public: void SetPerformanceConfiguration(PerformanceMode mode, PerformanceConfiguration config); void SetFromCpuBoostMode(CpuBoostMode mode); - PerformanceMode GetCurrentPerformanceMode(); + PerformanceMode GetCurrentPerformanceMode() const; PerformanceConfiguration GetCurrentPerformanceConfiguration(PerformanceMode mode); private: