summaryrefslogtreecommitdiff
path: root/src/input_common/udp/client.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/input_common/udp/client.cpp')
-rw-r--r--src/input_common/udp/client.cpp10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/input_common/udp/client.cpp b/src/input_common/udp/client.cpp
index 3f4eaf448..91e13482d 100644
--- a/src/input_common/udp/client.cpp
+++ b/src/input_common/udp/client.cpp
@@ -170,10 +170,18 @@ void Client::OnPadData(Response::PadData data) {
170 // directions correspond to the ones of the Switch 170 // directions correspond to the ones of the Switch
171 Common::Vec3f accel = Common::MakeVec<float>(data.accel.x, data.accel.y, data.accel.z); 171 Common::Vec3f accel = Common::MakeVec<float>(data.accel.x, data.accel.y, data.accel.z);
172 Common::Vec3f gyro = Common::MakeVec<float>(data.gyro.pitch, data.gyro.yaw, data.gyro.roll); 172 Common::Vec3f gyro = Common::MakeVec<float>(data.gyro.pitch, data.gyro.yaw, data.gyro.roll);
173
174 // TODO: Calculate the correct rotation vector and orientation matrix
175 const auto rotation = Common::MakeVec(0.0f, 0.0f, 0.0f);
176 const std::array orientation{
177 Common::Vec3f(1.0f, 0.0f, 0.0f),
178 Common::Vec3f(0.0f, 1.0f, 0.0f),
179 Common::Vec3f(0.0f, 0.0f, 1.0f),
180 };
173 { 181 {
174 std::lock_guard guard(status->update_mutex); 182 std::lock_guard guard(status->update_mutex);
175 183
176 status->motion_status = {accel, gyro}; 184 status->motion_status = {accel, gyro, rotation, orientation};
177 185
178 // TODO: add a setting for "click" touch. Click touch refers to a device that differentiates 186 // TODO: add a setting for "click" touch. Click touch refers to a device that differentiates
179 // between a simple "tap" and a hard press that causes the touch screen to click. 187 // between a simple "tap" and a hard press that causes the touch screen to click.