summaryrefslogtreecommitdiffstats
path: root/src/input_common/udp/client.cpp
diff options
context:
space:
mode:
authorgerman <german@thesoftwareartisans.com>2020-09-03 02:59:34 +0200
committergerman <german@thesoftwareartisans.com>2020-09-05 04:48:13 +0200
commit0774b17846fc7bd12bfe329fbaed6524d96c81cb (patch)
tree66322913f15800647404a33051d99454546eaa11 /src/input_common/udp/client.cpp
parentconfigure_input_player: Show/hide motion buttons based on the controller (diff)
downloadyuzu-0774b17846fc7bd12bfe329fbaed6524d96c81cb.tar
yuzu-0774b17846fc7bd12bfe329fbaed6524d96c81cb.tar.gz
yuzu-0774b17846fc7bd12bfe329fbaed6524d96c81cb.tar.bz2
yuzu-0774b17846fc7bd12bfe329fbaed6524d96c81cb.tar.lz
yuzu-0774b17846fc7bd12bfe329fbaed6524d96c81cb.tar.xz
yuzu-0774b17846fc7bd12bfe329fbaed6524d96c81cb.tar.zst
yuzu-0774b17846fc7bd12bfe329fbaed6524d96c81cb.zip
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) {
// directions correspond to the ones of the Switch
Common::Vec3f accel = Common::MakeVec<float>(data.accel.x, data.accel.y, data.accel.z);
Common::Vec3f gyro = Common::MakeVec<float>(data.gyro.pitch, data.gyro.yaw, data.gyro.roll);
+
+ // TODO: Calculate the correct rotation vector and orientation matrix
+ const auto rotation = Common::MakeVec(0.0f, 0.0f, 0.0f);
+ const std::array orientation{
+ Common::Vec3f(1.0f, 0.0f, 0.0f),
+ Common::Vec3f(0.0f, 1.0f, 0.0f),
+ Common::Vec3f(0.0f, 0.0f, 1.0f),
+ };
{
std::lock_guard guard(status->update_mutex);
- status->motion_status = {accel, gyro};
+ status->motion_status = {accel, gyro, rotation, orientation};
// 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.