mirror of
https://github.com/moonlight-stream/moonlight-common-c.git
synced 2026-06-24 05:31:13 +00:00
Pen tilt is 0..90 not -90..90
This commit is contained in:
+1
-1
@@ -145,7 +145,7 @@ typedef struct _SS_PEN_PACKET {
|
|||||||
netfloat y;
|
netfloat y;
|
||||||
netfloat pressure;
|
netfloat pressure;
|
||||||
uint16_t rotation;
|
uint16_t rotation;
|
||||||
int8_t tilt;
|
uint8_t tilt;
|
||||||
uint8_t zero2[1];
|
uint8_t zero2[1];
|
||||||
} SS_PEN_PACKET, *PSS_PEN_PACKET;
|
} SS_PEN_PACKET, *PSS_PEN_PACKET;
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -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,
|
int LiSendPenEvent(uint8_t eventType, uint8_t toolType, uint8_t penButtons,
|
||||||
float x, float y, float pressure,
|
float x, float y, float pressure,
|
||||||
uint16_t rotation, int8_t tilt) {
|
uint16_t rotation, uint8_t tilt) {
|
||||||
PPACKET_HOLDER holder;
|
PPACKET_HOLDER holder;
|
||||||
int err;
|
int err;
|
||||||
|
|
||||||
|
|||||||
+3
-3
@@ -590,8 +590,8 @@ int LiSendTouchEvent(uint8_t eventType, uint32_t pointerId, float x, float y, fl
|
|||||||
|
|
||||||
// This function is similar to LiSendTouchEvent() but allows additional parameters relevant for pen
|
// This function is similar to LiSendTouchEvent() but allows additional parameters relevant for pen
|
||||||
// input, including rotation, tilt, and buttons. Rotation is in degrees from vertical in Y dimension
|
// input, including rotation, tilt, and buttons. Rotation is in degrees from vertical in Y dimension
|
||||||
// (parallel to screen, 0..359) and tilt is in degrees from vertical in Z dimension (perpendicular
|
// (parallel to screen, 0..360) and tilt is in degrees from vertical in Z dimension (perpendicular
|
||||||
// to screen, -90..90).
|
// to screen, 0..90).
|
||||||
#define LI_TOOL_TYPE_PEN 0x01
|
#define LI_TOOL_TYPE_PEN 0x01
|
||||||
#define LI_TOOL_TYPE_ERASER 0x02
|
#define LI_TOOL_TYPE_ERASER 0x02
|
||||||
#define LI_PEN_BUTTON_PRIMARY 0x01
|
#define LI_PEN_BUTTON_PRIMARY 0x01
|
||||||
@@ -601,7 +601,7 @@ int LiSendTouchEvent(uint8_t eventType, uint32_t pointerId, float x, float y, fl
|
|||||||
#define LI_TILT_UNKNOWN 0xFF
|
#define LI_TILT_UNKNOWN 0xFF
|
||||||
int LiSendPenEvent(uint8_t eventType, uint8_t toolType, uint8_t penButtons,
|
int LiSendPenEvent(uint8_t eventType, uint8_t toolType, uint8_t penButtons,
|
||||||
float x, float y, float pressure,
|
float x, float y, float pressure,
|
||||||
uint16_t rotation, int8_t tilt);
|
uint16_t rotation, uint8_t tilt);
|
||||||
|
|
||||||
// This function queues a mouse button event to be sent to the remote server.
|
// This function queues a mouse button event to be sent to the remote server.
|
||||||
#define BUTTON_ACTION_PRESS 0x07
|
#define BUTTON_ACTION_PRESS 0x07
|
||||||
|
|||||||
Reference in New Issue
Block a user