summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorgerman77 <juangerman-13@hotmail.com>2022-01-07 01:06:05 +0100
committergerman77 <juangerman-13@hotmail.com>2022-01-07 03:05:49 +0100
commit4b4af29f860fb2fdecb76d705265b0bc2bcc7254 (patch)
tree594014b77dd97a2846fa598b3621903aaf573c7c
parentMerge pull request #7673 from german77/no_return (diff)
downloadyuzu-4b4af29f860fb2fdecb76d705265b0bc2bcc7254.tar
yuzu-4b4af29f860fb2fdecb76d705265b0bc2bcc7254.tar.gz
yuzu-4b4af29f860fb2fdecb76d705265b0bc2bcc7254.tar.bz2
yuzu-4b4af29f860fb2fdecb76d705265b0bc2bcc7254.tar.lz
yuzu-4b4af29f860fb2fdecb76d705265b0bc2bcc7254.tar.xz
yuzu-4b4af29f860fb2fdecb76d705265b0bc2bcc7254.tar.zst
yuzu-4b4af29f860fb2fdecb76d705265b0bc2bcc7254.zip
Diffstat (limited to '')
-rw-r--r--src/input_common/input_engine.cpp12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/input_common/input_engine.cpp b/src/input_common/input_engine.cpp
index 9c17ca4f7..b57330e51 100644
--- a/src/input_common/input_engine.cpp
+++ b/src/input_common/input_engine.cpp
@@ -298,8 +298,16 @@ void InputEngine::TriggerOnMotionChange(const PadIdentifier& identifier, int mot
if (!configuring || !mapping_callback.on_data) {
return;
}
- if (std::abs(value.gyro_x) < 0.6f && std::abs(value.gyro_y) < 0.6f &&
- std::abs(value.gyro_z) < 0.6f) {
+ bool is_active = false;
+ if (std::abs(value.accel_x) > 1.5f || std::abs(value.accel_y) > 1.5f ||
+ std::abs(value.accel_z) > 1.5f) {
+ is_active = true;
+ }
+ if (std::abs(value.gyro_x) > 0.6f || std::abs(value.gyro_y) > 0.6f ||
+ std::abs(value.gyro_z) > 0.6f) {
+ is_active = true;
+ }
+ if (!is_active) {
return;
}
mapping_callback.on_data(MappingData{