testevdev: Recognise touchpads as such

At the time I contributed this unit test, SDL didn't understand Linux
touchpads, but now it does.

Fixes: 373216ae "Added support for touchpads in the Linux evdev code"
Signed-off-by: Simon McVittie <smcv@collabora.com>
main
Simon McVittie 2022-04-12 14:16:29 +01:00 committed by Ryan C. Gordon
parent f708cebe10
commit c2946902fa
1 changed files with 3 additions and 6 deletions

View File

@ -41,6 +41,7 @@ static const struct
CLS(SOUND), CLS(SOUND),
CLS(TOUCHSCREEN), CLS(TOUCHSCREEN),
CLS(ACCELEROMETER), CLS(ACCELEROMETER),
CLS(TOUCHPAD),
#undef CLS #undef CLS
{ 0, NULL } { 0, NULL }
}; };
@ -185,9 +186,7 @@ static const GuessTest guess_tests[] =
.bus_type = 0x0003, .bus_type = 0x0003,
.vendor_id = 0x054c, .vendor_id = 0x054c,
.product_id = 0x09cc, .product_id = 0x09cc,
/* TODO: Should this be MOUSE? That's what it most closely .expected = SDL_UDEV_DEVICE_TOUCHPAD,
* resembles */
.expected = SDL_UDEV_DEVICE_UNKNOWN,
/* SYN, KEY, ABS */ /* SYN, KEY, ABS */
.ev = { 0x0b }, .ev = { 0x0b },
/* X, Y, multitouch */ /* X, Y, multitouch */
@ -718,9 +717,7 @@ static const GuessTest guess_tests[] =
.vendor_id = 0x06cb, .vendor_id = 0x06cb,
.product_id = 0x0000, .product_id = 0x0000,
.version = 0x0000, .version = 0x0000,
/* TODO: Should this be MOUSE? That's what it most closely .expected = SDL_UDEV_DEVICE_TOUCHPAD,
* resembles */
.expected = SDL_UDEV_DEVICE_UNKNOWN,
/* SYN, KEY, ABS */ /* SYN, KEY, ABS */
.ev = { 0x0b }, .ev = { 0x0b },
/* X, Y, pressure, multitouch */ /* X, Y, pressure, multitouch */