From 5cbb6f210d40d2af55e619526a4fc4a33df72c15 Mon Sep 17 00:00:00 2001 From: Cameron Gutman Date: Sat, 24 Jun 2023 15:14:17 -0500 Subject: [PATCH] Fix signness of pen tilt parameters --- src/Input.h | 4 ++-- src/InputStream.c | 2 +- src/Limelight.h | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Input.h b/src/Input.h index f420efb..2c50aee 100644 --- a/src/Input.h +++ b/src/Input.h @@ -145,8 +145,8 @@ typedef struct _SS_PEN_PACKET { netfloat y; netfloat pressure; uint16_t rotation; - uint8_t tiltX; - uint8_t tiltY; + int8_t tiltX; + int8_t tiltY; } SS_PEN_PACKET, *PSS_PEN_PACKET; #define SS_CONTROLLER_ARRIVAL_MAGIC 0x55000004 diff --git a/src/InputStream.c b/src/InputStream.c index a012940..5f406e0 100644 --- a/src/InputStream.c +++ b/src/InputStream.c @@ -1194,7 +1194,7 @@ int LiSendTouchEvent(uint8_t eventType, uint32_t pointerId, float x, float y, fl int LiSendPenEvent(uint8_t eventType, uint8_t toolType, uint8_t penButtons, float x, float y, float pressure, - uint16_t rotation, uint8_t tiltX, uint8_t tiltY) { + uint16_t rotation, int8_t tiltX, int8_t tiltY) { PPACKET_HOLDER holder; int err; diff --git a/src/Limelight.h b/src/Limelight.h index eb6e726..467d61c 100644 --- a/src/Limelight.h +++ b/src/Limelight.h @@ -599,7 +599,7 @@ int LiSendTouchEvent(uint8_t eventType, uint32_t pointerId, float x, float y, fl #define LI_ROT_UNKNOWN 0xFF int LiSendPenEvent(uint8_t eventType, uint8_t toolType, uint8_t penButtons, float x, float y, float pressure, - uint16_t rotation, uint8_t tiltX, uint8_t tiltY); + uint16_t rotation, int8_t tiltX, int8_t tiltY); // This function queues a mouse button event to be sent to the remote server. #define BUTTON_ACTION_PRESS 0x07