testevdev: Try to correct Wii devices guessed from kernel source
The comments here disagreed with the actual bytes. According to https://elixir.bootlin.com/linux/v6.3.7/source/drivers/hid/hid-wiimote-modules.c, the Balance Board reports BTN_A and ABS_HAT0X, HAT0Y, HAT1X and HAT1Y. This means the comments here were correct, but the .abs bits shown were in the wrong byte. Matching the Wii U Pro Controller against the same kernel source, it appears to be correct: it's the same representation as a PS3 gamepad, except that it lacks the Z and RZ axes for analogue triggers. Signed-off-by: Simon McVittie <smcv@collabora.com>main
parent
ffdafcd880
commit
c13e511844
|
@ -1073,22 +1073,24 @@ static const GuessTest guess_tests[] =
|
|||
},
|
||||
},
|
||||
{
|
||||
/* Flags guessed from kernel source code */
|
||||
/* Flags guessed from kernel source code, not confirmed with real
|
||||
* hardware */
|
||||
.name = "Wiimote - Balance Board",
|
||||
/* TODO: Should this be JOYSTICK? */
|
||||
.expected = SDL_UDEV_DEVICE_UNKNOWN,
|
||||
/* SYN, KEY, ABS */
|
||||
.ev = { 0x0b },
|
||||
/* Hat 0-1 */
|
||||
.abs = { 0x00, 0x0f },
|
||||
.abs = { 0x00, 0x00, 0x0f },
|
||||
.keys = {
|
||||
/* 0x00-0xff */ ZEROx8, ZEROx8, ZEROx8, ZEROx8,
|
||||
/* A */
|
||||
/* BTN_A */
|
||||
/* 0x100 */ ZEROx4, 0x00, 0x00, 0x01, 0x00,
|
||||
},
|
||||
},
|
||||
{
|
||||
/* Flags guessed from kernel source code */
|
||||
/* Flags guessed from kernel source code, not confirmed with real
|
||||
* hardware */
|
||||
.name = "Wiimote - Wii U Pro Controller",
|
||||
.expected = SDL_UDEV_DEVICE_JOYSTICK,
|
||||
/* SYN, KEY, ABS */
|
||||
|
|
Loading…
Reference in New Issue