You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(HID): Use correct data format for composite stick axes in layout builder
The generic HID layout builder made a faulty assumption that the X and Y axes of a composite "Stick" control always used a simple bitfield format (`SBIT`/`BIT`).
This assumption is incorrect for many modern devices, most notably 6DoF controllers like the 3Dconnexion SpaceMouse, which report their axes as 16-bit shorts (`SHRT`). This bug caused the builder to apply the wrong data format, resulting in incorrect parsing and unusable stick input for these devices.
This commit resolves the issue by replacing the brittle, hardcoded format logic with a call to the `element.DetermineFormat()` helper method. This is the same robust method used by the general-purpose element processor later in the same function.
This change:
- Fixes axis detection for 6DoF controllers and other HID devices that use `SHRT` or `BYTE` formats.
- Makes the special-case "Stick" logic consistent with the rest of the HID parser.
0 commit comments