From 8b12585e1d1be73aff289cb91faa5d53a9028fda Mon Sep 17 00:00:00 2001
From: Simon McVittie <[EMAIL REDACTED]>
Date: Mon, 10 Jul 2023 12:54:49 +0100
Subject: [PATCH] testevdev: Add some examples of PDP third-party Switch
controllers
Thanks: Ravi Kanodia
Signed-off-by: Simon McVittie <smcv@collabora.com>
---
test/testevdev.c | 24 ++++++++++++++++++++++++
1 file changed, 24 insertions(+)
diff --git a/test/testevdev.c b/test/testevdev.c
index d118efd47e9e..9758bbe246d0 100644
--- a/test/testevdev.c
+++ b/test/testevdev.c
@@ -978,6 +978,30 @@ static const GuessTest guess_tests[] =
/* 0x2c0 */ 0x03,
},
},
+ { /* https://github.com/ValveSoftware/steam-devices/pull/40 */
+ .name = "PDP wired Pro Controller for Switch",
+ /* 0003:0e6f:0184 "Performance Designed Products" /
+ * "Faceoff Deluxe+ Audio Wired Controller for Nintendo Switch" appears
+ * to be functionally equivalent */
+ .eviocgname = "PDP CO.,LTD. Faceoff Wired Pro Controller for Nintendo Switch",
+ .usb_vendor_name = "PDP CO.,LTD.",
+ .usb_product_name = "Faceoff Wired Pro Controller for Nintendo Switch",
+ .bus_type = 0x0003,
+ .vendor_id = 0x0e6f,
+ .product_id = 0x0180,
+ .version = 0x0111,
+ .expected = SDL_UDEV_DEVICE_JOYSTICK,
+ /* SYN, KEY, ABS, MSC */
+ .ev = { 0x1b },
+ /* X, Y, Z, RZ, HAT0X, HAT0Y */
+ .abs = { 0x27, 0x00, 0x03 },
+ .keys = {
+ /* 0x00-0xff */ ZEROx8, ZEROx8, ZEROx8, ZEROx8,
+ /* ABC, XYZ, TL, TR, TL2, TR2, SELECT, START, MODE,
+ * THUMBL */
+ /* 0x100 */ ZEROx4, 0x00, 0x00, 0xff, 0x3f,
+ },
+ },
{
.name = "NES Controller (R) NES-style Joycon from Nintendo Online",
.eviocgname = "NES Controller (R)",