diff options
Diffstat (limited to 'src/input_common/udp/client.cpp')
| -rw-r--r-- | src/input_common/udp/client.cpp | 8 |
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() { | |||
| 274 | 274 | ||
| 275 | void Client::UpdateYuzuSettings(std::size_t client, const Common::Vec3<float>& acc, | 275 | void Client::UpdateYuzuSettings(std::size_t client, const Common::Vec3<float>& acc, |
| 276 | const Common::Vec3<float>& gyro, bool touch) { | 276 | const Common::Vec3<float>& gyro, bool touch) { |
| 277 | if (gyro.Length() > 0.2f) { | ||
| 278 | LOG_DEBUG(Input, "UDP Controller {}: gyro=({}, {}, {}), accel=({}, {}, {}), touch={}", | ||
| 279 | client, gyro[0], gyro[1], gyro[2], acc[0], acc[1], acc[2], touch); | ||
| 280 | } | ||
| 277 | UDPPadStatus pad; | 281 | UDPPadStatus pad; |
| 278 | if (touch) { | 282 | if (touch) { |
| 279 | pad.touch = PadTouch::Click; | 283 | pad.touch = PadTouch::Click; |
| 280 | pad_queue[client].Push(pad); | 284 | pad_queue[client].Push(pad); |
| 281 | } | 285 | } |
| 282 | for (size_t i = 0; i < 3; ++i) { | 286 | for (size_t i = 0; i < 3; ++i) { |
| 283 | if (gyro[i] > 6.0f || gyro[i] < -6.0f) { | 287 | if (gyro[i] > 5.0f || gyro[i] < -5.0f) { |
| 284 | pad.motion = static_cast<PadMotion>(i); | 288 | pad.motion = static_cast<PadMotion>(i); |
| 285 | pad.motion_value = gyro[i]; | 289 | pad.motion_value = gyro[i]; |
| 286 | pad_queue[client].Push(pad); | 290 | pad_queue[client].Push(pad); |
| 287 | } | 291 | } |
| 288 | if (acc[i] > 2.0f || acc[i] < -2.0f) { | 292 | if (acc[i] > 1.75f || acc[i] < -1.75f) { |
| 289 | pad.motion = static_cast<PadMotion>(i + 3); | 293 | pad.motion = static_cast<PadMotion>(i + 3); |
| 290 | pad.motion_value = acc[i]; | 294 | pad.motion_value = acc[i]; |
| 291 | pad_queue[client].Push(pad); | 295 | pad_queue[client].Push(pad); |