From 7b526d0cad2b1238427f44c40f3279e7196a602f Mon Sep 17 00:00:00 2001 From: Simon McVittie Date: Thu, 8 Jun 2023 15:46:52 +0100 Subject: [PATCH] testevdev: Finish incomplete data for Switch Pro Controller via USB This didn't include any buttons, which I assume was because I transcribed them incorrectly rather than reflecting reality. Confirmed against another Switch Pro Controller on a more recent kernel (thanks to Jeremy Whiting). Signed-off-by: Simon McVittie --- test/testevdev.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/test/testevdev.c b/test/testevdev.c index 067db01a7e..9bd3d82547 100644 --- a/test/testevdev.c +++ b/test/testevdev.c @@ -583,6 +583,17 @@ static const GuessTest guess_tests[] = .abs = { 0x27, 0x00, 0x03 }, .keys = { /* 0x00-0xff */ ZEROx8, ZEROx8, ZEROx8, ZEROx8, + /* 16 buttons: TRIGGER, THUMB, THUMB2, TOP, TOP2, PINKIE, BASE, + * BASE2..BASE6, unregistered event codes 0x12c-0x12e, DEAD */ + /* 0x100 */ ZEROx4, 0xff, 0xff, 0x00, 0x00, + /* 0x140 */ ZEROx8, + /* 0x180 */ ZEROx8, + /* 0x1c0 */ ZEROx8, + /* 0x200 */ ZEROx8, + /* 0x240 */ ZEROx8, + /* 0x280 */ ZEROx8, + /* TRIGGER_HAPPY1..TRIGGER_HAPPY2 */ + /* 0x2c0 */ 0x03, }, }, {