summaryrefslogtreecommitdiffstats
path: root/src/input_common
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2020-10-07 00:29:28 +0200
committerGitHub <noreply@github.com>2020-10-07 00:29:28 +0200
commite9b81e9f01d422bd7295ed840e60c42cf8e18fb3 (patch)
treecc10ca12edba54f92f4c98cde398e9472ebd7368 /src/input_common
parentMerge pull request #4742 from german77/InputFilter (diff)
parentReduce the "shake" requirements when configuring UDP. (diff)
downloadyuzu-e9b81e9f01d422bd7295ed840e60c42cf8e18fb3.tar
yuzu-e9b81e9f01d422bd7295ed840e60c42cf8e18fb3.tar.gz
yuzu-e9b81e9f01d422bd7295ed840e60c42cf8e18fb3.tar.bz2
yuzu-e9b81e9f01d422bd7295ed840e60c42cf8e18fb3.tar.lz
yuzu-e9b81e9f01d422bd7295ed840e60c42cf8e18fb3.tar.xz
yuzu-e9b81e9f01d422bd7295ed840e60c42cf8e18fb3.tar.zst
yuzu-e9b81e9f01d422bd7295ed840e60c42cf8e18fb3.zip
Diffstat (limited to 'src/input_common')
-rw-r--r--src/input_common/udp/client.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/input_common/udp/client.cpp b/src/input_common/udp/client.cpp
index 2b6a68d4b..cf72f6fef 100644
--- a/src/input_common/udp/client.cpp
+++ b/src/input_common/udp/client.cpp
@@ -274,18 +274,22 @@ void Client::Reset() {
void Client::UpdateYuzuSettings(std::size_t client, const Common::Vec3<float>& acc,
const Common::Vec3<float>& gyro, bool touch) {
+ if (gyro.Length() > 0.2f) {
+ LOG_DEBUG(Input, "UDP Controller {}: gyro=({}, {}, {}), accel=({}, {}, {}), touch={}",
+ client, gyro[0], gyro[1], gyro[2], acc[0], acc[1], acc[2], touch);
+ }
UDPPadStatus pad;
if (touch) {
pad.touch = PadTouch::Click;
pad_queue[client].Push(pad);
}
for (size_t i = 0; i < 3; ++i) {
- if (gyro[i] > 6.0f || gyro[i] < -6.0f) {
+ if (gyro[i] > 5.0f || gyro[i] < -5.0f) {
pad.motion = static_cast<PadMotion>(i);
pad.motion_value = gyro[i];
pad_queue[client].Push(pad);
}
- if (acc[i] > 2.0f || acc[i] < -2.0f) {
+ if (acc[i] > 1.75f || acc[i] < -1.75f) {
pad.motion = static_cast<PadMotion>(i + 3);
pad.motion_value = acc[i];
pad_queue[client].Push(pad);