Skip to content

Commit 38231a9

Browse files
committed
test: Remove superfluous null byte from ps3_hid_report_descriptor
Remove a superfluous null byte at the end of ps3_hid_report_descriptor, as it might confuse some more stricter parser. The data in ps3_hid_report_descriptor probably comes for a libinput recording, and sometimes those can have superfluous null byte at the end. This is mentioned for example in the hidreport project: https://github.com/hidutils/hidreport/blob/64d40674038e8bb5e76c4191f5561ec1928c3c72/tools/libinput-recording-extract-hid-descriptor.py#L25-L27 As a proof that the original HID report descriptor of the actual device is 148 bytes long, the following lsusb capture can be compared: http://ps3.jim.sh/sixaxis/usb/lsusb.txt Signed-off-by: Antonio Ospite <antonio.ospite@collabora.com>
1 parent 64067c1 commit 38231a9

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

test/testevdev.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -194,9 +194,9 @@ static unsigned char ps3_hid_report_descriptor[] =
194194
0xc0, 0xa1, 0x02, 0x85, 0xee, 0x75, 0x08, 0x95,
195195
0x30, 0x09, 0x01, 0xb1, 0x02, 0xc0, 0xa1, 0x02,
196196
0x85, 0xef, 0x75, 0x08, 0x95, 0x30, 0x09, 0x01,
197-
0xb1, 0x02, 0xc0, 0xc0, 0x00,
197+
0xb1, 0x02, 0xc0, 0xc0,
198198
};
199-
SDL_COMPILE_TIME_ASSERT (ps3, sizeof (ps3_hid_report_descriptor) == 149);
199+
SDL_COMPILE_TIME_ASSERT (ps3, sizeof (ps3_hid_report_descriptor) == 148);
200200

201201
/* Same for Steam Deck LCD (jupiter) and OLED (galileo) */
202202
static unsigned char steam_deck_mouse_hid_report_descriptor[] =

0 commit comments

Comments
 (0)