diff options
author | german77 <juangerman-13@hotmail.com> | 2023-11-03 00:42:47 +0100 |
---|---|---|
committer | german77 <juangerman-13@hotmail.com> | 2023-11-03 01:39:08 +0100 |
commit | 57cf830862bac1d68d660c120014e7d5021b72e8 (patch) | |
tree | 20180cba4d5f62bedc9684a086ff48b7482b8d42 /src/core/hid/emulated_controller.cpp | |
parent | Merge pull request #11920 from Termynat0r/master (diff) | |
download | yuzu-57cf830862bac1d68d660c120014e7d5021b72e8.tar yuzu-57cf830862bac1d68d660c120014e7d5021b72e8.tar.gz yuzu-57cf830862bac1d68d660c120014e7d5021b72e8.tar.bz2 yuzu-57cf830862bac1d68d660c120014e7d5021b72e8.tar.lz yuzu-57cf830862bac1d68d660c120014e7d5021b72e8.tar.xz yuzu-57cf830862bac1d68d660c120014e7d5021b72e8.tar.zst yuzu-57cf830862bac1d68d660c120014e7d5021b72e8.zip |
Diffstat (limited to 'src/core/hid/emulated_controller.cpp')
-rw-r--r-- | src/core/hid/emulated_controller.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/core/hid/emulated_controller.cpp b/src/core/hid/emulated_controller.cpp index 2af3f06fc..8e2894449 100644 --- a/src/core/hid/emulated_controller.cpp +++ b/src/core/hid/emulated_controller.cpp @@ -1091,30 +1091,30 @@ void EmulatedController::SetBattery(const Common::Input::CallbackStatus& callbac bool is_charging = false; bool is_powered = false; - NpadBatteryLevel battery_level = 0; + NpadBatteryLevel battery_level = NpadBatteryLevel::Empty; switch (controller.battery_values[index]) { case Common::Input::BatteryLevel::Charging: is_charging = true; is_powered = true; - battery_level = 6; + battery_level = NpadBatteryLevel::Full; break; case Common::Input::BatteryLevel::Medium: - battery_level = 6; + battery_level = NpadBatteryLevel::High; break; case Common::Input::BatteryLevel::Low: - battery_level = 4; + battery_level = NpadBatteryLevel::Low; break; case Common::Input::BatteryLevel::Critical: - battery_level = 2; + battery_level = NpadBatteryLevel::Critical; break; case Common::Input::BatteryLevel::Empty: - battery_level = 0; + battery_level = NpadBatteryLevel::Empty; break; case Common::Input::BatteryLevel::None: case Common::Input::BatteryLevel::Full: default: is_powered = true; - battery_level = 8; + battery_level = NpadBatteryLevel::Full; break; } |