mirror of
https://github.com/gnif/LookingGlass.git
synced 2026-08-09 16:51:31 +00:00
[idd] input: preserve reports under backpressure
Move named pipe writes off the LGMP input worker so a stalled LGInput endpoint cannot block queue draining or lease maintenance. Coalesce motion only under queue pressure while preserving mode, button, wheel, and keyboard transitions. Reset HID state after discontinuities and carry all 32 mouse button bits through the pipe and HID reports.
This commit is contained in:
@@ -35,7 +35,7 @@ enum HIDReportId : uint8_t
|
||||
struct HIDMouseAbsoluteReport
|
||||
{
|
||||
uint8_t reportId;
|
||||
uint8_t buttons;
|
||||
uint32_t buttons;
|
||||
uint16_t x;
|
||||
uint16_t y;
|
||||
int8_t wheel;
|
||||
@@ -44,7 +44,7 @@ struct HIDMouseAbsoluteReport
|
||||
struct HIDMouseRelativeReport
|
||||
{
|
||||
uint8_t reportId;
|
||||
uint8_t buttons;
|
||||
uint32_t buttons;
|
||||
int16_t x;
|
||||
int16_t y;
|
||||
int8_t wheel;
|
||||
@@ -66,11 +66,14 @@ struct HIDKeyboardLedsReport
|
||||
|
||||
#pragma pack(pop)
|
||||
|
||||
static_assert(sizeof(HIDMouseAbsoluteReport) == 7);
|
||||
static_assert(sizeof(HIDMouseRelativeReport) == 7);
|
||||
static_assert(sizeof(HIDMouseAbsoluteReport) == 10);
|
||||
static_assert(sizeof(HIDMouseRelativeReport) == 10);
|
||||
static_assert(sizeof(HIDKeyboardReport) == 9);
|
||||
static_assert(sizeof(HIDKeyboardLedsReport) == 2);
|
||||
|
||||
static constexpr size_t HID_MAX_INPUT_REPORT_SIZE =
|
||||
sizeof(HIDMouseAbsoluteReport);
|
||||
|
||||
const uint8_t * HIDGetReportDescriptor();
|
||||
size_t HIDGetReportDescriptorSize();
|
||||
size_t HIDGetInputReportSize(uint8_t reportId);
|
||||
|
||||
Reference in New Issue
Block a user