diff options
| author | MasterPhi <[email protected]> | 2021-08-31 11:27:43 +0200 |
|---|---|---|
| committer | MasterPhi <[email protected]> | 2021-08-31 11:27:43 +0200 |
| commit | 8305766afe909a6f1b3be6a88cd4e6c4017255a8 (patch) | |
| tree | 633435c2379da7f816699fd8694ef2e07b489e09 /src | |
| parent | 38f5aee9c31299874dcda1758cb98e4404c6ad9d (diff) | |
fix HID_LOGICAL_MAX overflow.
Diffstat (limited to 'src')
| -rw-r--r-- | src/class/hid/hid_device.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/class/hid/hid_device.h b/src/class/hid/hid_device.h index 5cf4b3060..7f67fa9cf 100644 --- a/src/class/hid/hid_device.h +++ b/src/class/hid/hid_device.h @@ -364,14 +364,14 @@ static inline bool tud_hid_gamepad_report(uint8_t report_id, int8_t x, int8_t y /* Input */ \ HID_USAGE ( 0x02 ),\ HID_LOGICAL_MIN ( 0x00 ),\ - HID_LOGICAL_MAX ( 0xff ),\ + HID_LOGICAL_MAX_N ( 0xff, 2 ),\ HID_REPORT_SIZE ( 8 ),\ HID_REPORT_COUNT( report_size ),\ HID_INPUT ( HID_DATA | HID_VARIABLE | HID_ABSOLUTE ),\ /* Output */ \ HID_USAGE ( 0x03 ),\ HID_LOGICAL_MIN ( 0x00 ),\ - HID_LOGICAL_MAX ( 0xff ),\ + HID_LOGICAL_MAX_N ( 0xff, 2 ),\ HID_REPORT_SIZE ( 8 ),\ HID_REPORT_COUNT( report_size ),\ HID_OUTPUT ( HID_DATA | HID_VARIABLE | HID_ABSOLUTE ),\ |
