summaryrefslogtreecommitdiffstats
path: root/src/input_common/udp/client.cpp
diff options
context:
space:
mode:
authorgerman <german@thesoftwareartisans.com>2020-09-18 03:26:34 +0200
committergerman <german@thesoftwareartisans.com>2020-09-26 00:59:52 +0200
commit03b574ae2272fc8465e7d38f21b198fcb1885186 (patch)
treee6e70906677339fce1a7bedafab8d8fcb39026b4 /src/input_common/udp/client.cpp
parentMerge pull request #4717 from lioncash/debug (diff)
downloadyuzu-03b574ae2272fc8465e7d38f21b198fcb1885186.tar
yuzu-03b574ae2272fc8465e7d38f21b198fcb1885186.tar.gz
yuzu-03b574ae2272fc8465e7d38f21b198fcb1885186.tar.bz2
yuzu-03b574ae2272fc8465e7d38f21b198fcb1885186.tar.lz
yuzu-03b574ae2272fc8465e7d38f21b198fcb1885186.tar.xz
yuzu-03b574ae2272fc8465e7d38f21b198fcb1885186.tar.zst
yuzu-03b574ae2272fc8465e7d38f21b198fcb1885186.zip
Diffstat (limited to '')
-rw-r--r--src/input_common/udp/client.cpp8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/input_common/udp/client.cpp b/src/input_common/udp/client.cpp
index 2b6a68d4b..b6323d56f 100644
--- a/src/input_common/udp/client.cpp
+++ b/src/input_common/udp/client.cpp
@@ -219,14 +219,10 @@ void Client::OnPadData(Response::PadData data) {
clients[client].motion.SetGyroscope(raw_gyroscope / 312.0f);
clients[client].motion.UpdateRotation(time_difference);
clients[client].motion.UpdateOrientation(time_difference);
- Common::Vec3f gyroscope = clients[client].motion.GetGyroscope();
- Common::Vec3f accelerometer = clients[client].motion.GetAcceleration();
- Common::Vec3f rotation = clients[client].motion.GetRotations();
- std::array<Common::Vec3f, 3> orientation = clients[client].motion.GetOrientation();
{
std::lock_guard guard(clients[client].status.update_mutex);
- clients[client].status.motion_status = {accelerometer, gyroscope, rotation, orientation};
+ clients[client].status.motion_status = clients[client].motion.GetMotion();
// TODO: add a setting for "click" touch. Click touch refers to a device that differentiates
// between a simple "tap" and a hard press that causes the touch screen to click.
@@ -250,6 +246,8 @@ void Client::OnPadData(Response::PadData data) {
clients[client].status.touch_status = {x, y, is_active};
if (configuring) {
+ const Common::Vec3f gyroscope = clients[client].motion.GetGyroscope();
+ const Common::Vec3f accelerometer = clients[client].motion.GetAcceleration();
UpdateYuzuSettings(client, accelerometer, gyroscope, is_active);
}
}