aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/input_common/input_engine.cpp
diff options
context:
space:
mode:
authorgerman77 <[email protected]>2022-02-06 18:20:12 -0600
committergerman77 <[email protected]>2022-02-06 18:33:55 -0600
commit21742f00961308fedb35cf38261afba3c1682853 (patch)
treea130ab5b3d1a214e546227edf448a14e0be01081 /src/input_common/input_engine.cpp
parentb720009dc0641a0899d9be347c892472a6916ef5 (diff)
downloadyuzu-mainline-21742f00961308fedb35cf38261afba3c1682853.tar.gz
yuzu-mainline-21742f00961308fedb35cf38261afba3c1682853.zip
input_common: Remove battery duplicated struct and update every button press
Diffstat (limited to 'src/input_common/input_engine.cpp')
-rw-r--r--src/input_common/input_engine.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/input_common/input_engine.cpp b/src/input_common/input_engine.cpp
index 0508b408d..0d6de9e6a 100644
--- a/src/input_common/input_engine.cpp
+++ b/src/input_common/input_engine.cpp
@@ -70,7 +70,7 @@ void InputEngine::SetAxis(const PadIdentifier& identifier, int axis, f32 value)
TriggerOnAxisChange(identifier, axis, value);
}
-void InputEngine::SetBattery(const PadIdentifier& identifier, BatteryLevel value) {
+void InputEngine::SetBattery(const PadIdentifier& identifier, Common::Input::BatteryLevel value) {
{
std::lock_guard lock{mutex};
ControllerData& controller = controller_list.at(identifier);
@@ -143,13 +143,13 @@ f32 InputEngine::GetAxis(const PadIdentifier& identifier, int axis) const {
return axis_iter->second;
}
-BatteryLevel InputEngine::GetBattery(const PadIdentifier& identifier) const {
+Common::Input::BatteryLevel InputEngine::GetBattery(const PadIdentifier& identifier) const {
std::lock_guard lock{mutex};
const auto controller_iter = controller_list.find(identifier);
if (controller_iter == controller_list.cend()) {
LOG_ERROR(Input, "Invalid identifier guid={}, pad={}, port={}", identifier.guid.Format(),
identifier.pad, identifier.port);
- return BatteryLevel::Charging;
+ return Common::Input::BatteryLevel::Charging;
}
const ControllerData& controller = controller_iter->second;
return controller.battery;
@@ -270,7 +270,7 @@ void InputEngine::TriggerOnAxisChange(const PadIdentifier& identifier, int axis,
}
void InputEngine::TriggerOnBatteryChange(const PadIdentifier& identifier,
- [[maybe_unused]] BatteryLevel value) {
+ [[maybe_unused]] Common::Input::BatteryLevel value) {
std::lock_guard lock{mutex_callback};
for (const auto& poller_pair : callback_list) {
const InputIdentifier& poller = poller_pair.second;