18 Dec
2025
18 Dec
'25
8:39 a.m.
Tomasz Pakuła (@Lawstorant) commented about dlls/winebus.sys/hid.c:
return TRUE; }
-static BOOL hid_device_add_axis_count(struct unix_device *iface, BOOL rel, BYTE count, +static BYTE hid_device_determine_axis_size(LONG min, LONG max) +{ + if (min >= -128 && max <= 127) return 8; + if (min >= -32768 && max <= 32767) return 16; + return 32; +}
Axes can have unsigned values and this doesn't take this into consideration. ```suggestion:-5+0 static BYTE hid_device_determine_axis_size(LONG min, ULONG max) { if (min >= -128 && max <= 255) return 8; if (min >= -32768 && max <= 65535) return 16; return 32; } ``` -- https://gitlab.winehq.org/wine/wine/-/merge_requests/9789#note_125775