summaryrefslogtreecommitdiffstats
path: root/src/core/hid/input_converter.cpp
diff options
context:
space:
mode:
authorgerman77 <juangerman-13@hotmail.com>2021-10-25 06:23:54 +0200
committerNarr the Reg <juangerman-13@hotmail.com>2021-11-25 03:30:26 +0100
commit064ddacf49aa7155e26add55983b81fdda997077 (patch)
tree17f6d767233c10578d84d2029014a3dfa4b55396 /src/core/hid/input_converter.cpp
parentinput_common: Add manual update options to input devices (diff)
downloadyuzu-064ddacf49aa7155e26add55983b81fdda997077.tar
yuzu-064ddacf49aa7155e26add55983b81fdda997077.tar.gz
yuzu-064ddacf49aa7155e26add55983b81fdda997077.tar.bz2
yuzu-064ddacf49aa7155e26add55983b81fdda997077.tar.lz
yuzu-064ddacf49aa7155e26add55983b81fdda997077.tar.xz
yuzu-064ddacf49aa7155e26add55983b81fdda997077.tar.zst
yuzu-064ddacf49aa7155e26add55983b81fdda997077.zip
Diffstat (limited to 'src/core/hid/input_converter.cpp')
-rw-r--r--src/core/hid/input_converter.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/core/hid/input_converter.cpp b/src/core/hid/input_converter.cpp
index b3c8913ce..e2598f367 100644
--- a/src/core/hid/input_converter.cpp
+++ b/src/core/hid/input_converter.cpp
@@ -33,6 +33,10 @@ Input::BatteryStatus TransformToBattery(const Input::CallbackStatus& callback) {
}
break;
}
+ case Input::InputType::Button:
+ battery = callback.button_status.value ? Input::BatteryLevel::Charging
+ : Input::BatteryLevel::Critical;
+ break;
case Input::InputType::Battery:
battery = callback.battery_status;
break;