summaryrefslogtreecommitdiff
path: root/src/core/hle/service/apm
diff options
context:
space:
mode:
authorGravatar Narr the Reg2022-02-21 16:01:20 -0600
committerGravatar Narr the Reg2022-02-21 18:00:50 -0600
commitd44464829ba4448a51c199be893840b33903c489 (patch)
tree0dc25d8e699784cd53610ee26106d3fab8dfe77b /src/core/hle/service/apm
parentMerge pull request #7913 from voidanix/anv-fix (diff)
downloadyuzu-d44464829ba4448a51c199be893840b33903c489.tar.gz
yuzu-d44464829ba4448a51c199be893840b33903c489.tar.xz
yuzu-d44464829ba4448a51c199be893840b33903c489.zip
service: am: Update enum names to match documentation
Diffstat (limited to 'src/core/hle/service/apm')
-rw-r--r--src/core/hle/service/apm/apm_controller.cpp10
-rw-r--r--src/core/hle/service/apm/apm_controller.h15
2 files changed, 14 insertions, 11 deletions
diff --git a/src/core/hle/service/apm/apm_controller.cpp b/src/core/hle/service/apm/apm_controller.cpp
index 98839fe97..187fef2ad 100644
--- a/src/core/hle/service/apm/apm_controller.cpp
+++ b/src/core/hle/service/apm/apm_controller.cpp
@@ -17,8 +17,8 @@ constexpr auto DEFAULT_PERFORMANCE_CONFIGURATION = PerformanceConfiguration::Con
17 17
18Controller::Controller(Core::Timing::CoreTiming& core_timing_) 18Controller::Controller(Core::Timing::CoreTiming& core_timing_)
19 : core_timing{core_timing_}, configs{ 19 : core_timing{core_timing_}, configs{
20 {PerformanceMode::Handheld, DEFAULT_PERFORMANCE_CONFIGURATION}, 20 {PerformanceMode::Normal, DEFAULT_PERFORMANCE_CONFIGURATION},
21 {PerformanceMode::Docked, DEFAULT_PERFORMANCE_CONFIGURATION}, 21 {PerformanceMode::Boost, DEFAULT_PERFORMANCE_CONFIGURATION},
22 } {} 22 } {}
23 23
24Controller::~Controller() = default; 24Controller::~Controller() = default;
@@ -63,13 +63,13 @@ void Controller::SetFromCpuBoostMode(CpuBoostMode mode) {
63 PerformanceConfiguration::Config15, 63 PerformanceConfiguration::Config15,
64 }}; 64 }};
65 65
66 SetPerformanceConfiguration(PerformanceMode::Docked, 66 SetPerformanceConfiguration(PerformanceMode::Boost,
67 BOOST_MODE_TO_CONFIG_MAP.at(static_cast<u32>(mode))); 67 BOOST_MODE_TO_CONFIG_MAP.at(static_cast<u32>(mode)));
68} 68}
69 69
70PerformanceMode Controller::GetCurrentPerformanceMode() const { 70PerformanceMode Controller::GetCurrentPerformanceMode() const {
71 return Settings::values.use_docked_mode.GetValue() ? PerformanceMode::Docked 71 return Settings::values.use_docked_mode.GetValue() ? PerformanceMode::Boost
72 : PerformanceMode::Handheld; 72 : PerformanceMode::Normal;
73} 73}
74 74
75PerformanceConfiguration Controller::GetCurrentPerformanceConfiguration(PerformanceMode mode) { 75PerformanceConfiguration Controller::GetCurrentPerformanceConfiguration(PerformanceMode mode) {
diff --git a/src/core/hle/service/apm/apm_controller.h b/src/core/hle/service/apm/apm_controller.h
index 8d48e0104..d6fbd2c0c 100644
--- a/src/core/hle/service/apm/apm_controller.h
+++ b/src/core/hle/service/apm/apm_controller.h
@@ -32,15 +32,18 @@ enum class PerformanceConfiguration : u32 {
32 Config16 = 0x9222000C, 32 Config16 = 0x9222000C,
33}; 33};
34 34
35// This is nn::oe::CpuBoostMode
35enum class CpuBoostMode : u32 { 36enum class CpuBoostMode : u32 {
36 Disabled = 0, 37 Normal = 0, // Boost mode disabled
37 Full = 1, // CPU + GPU -> Config 13, 14, 15, or 16 38 FastLoad = 1, // CPU + GPU -> Config 13, 14, 15, or 16
38 Partial = 2, // GPU Only -> Config 15 or 16 39 Partial = 2, // GPU Only -> Config 15 or 16
39}; 40};
40 41
41enum class PerformanceMode : u8 { 42// This is nn::oe::PerformanceMode
42 Handheld = 0, 43enum class PerformanceMode : s32 {
43 Docked = 1, 44 Invalid = -1,
45 Normal = 0,
46 Boost = 1,
44}; 47};
45 48
46// Class to manage the state and change of the emulated system performance. 49// Class to manage the state and change of the emulated system performance.