SDL: testevdev: Add test data for another Switch Pro Controller

From 9ad0b8b47f351fb30c6cc35bd47b1f09872836d4 Mon Sep 17 00:00:00 2001
From: Simon McVittie <[EMAIL REDACTED]>
Date: Thu, 8 Jun 2023 15:47:50 +0100
Subject: [PATCH] testevdev: Add test data for another Switch Pro Controller

A newer evemu-describe transcript has this same controller with its
buttons mapped differently, presumably a result of driver changes in
the Linux kernel. Either way, we should recognise it as a gamepad.
Thanks to Jeremy Whiting.

Signed-off-by: Simon McVittie <smcv@collabora.com>
---
 test/testevdev.c | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)

diff --git a/test/testevdev.c b/test/testevdev.c
index 9bd3d825473f..8167b67e79a4 100644
--- a/test/testevdev.c
+++ b/test/testevdev.c
@@ -570,6 +570,24 @@ static const GuessTest guess_tests[] =
           /* 0x2c0 */ 0x03,
       },
     },
+    {
+      .name = "Switch Pro Controller via Bluetooth (Linux 6.2.11)",
+      .bus_type = 0x0005,
+      .vendor_id = 0x057e,
+      .product_id = 0x2009,
+      .version = 0x0001,
+      .expected = SDL_UDEV_DEVICE_JOYSTICK,
+      /* SYN, KEY, ABS */
+      .ev = { 0x0b },
+      /* X, Y, RX, RY, hat 0 */
+      .abs = { 0x1b, 0x00, 0x03 },
+      .keys = {
+          /* 0x00-0xff */ ZEROx8, ZEROx8, ZEROx8, ZEROx8,
+          /* ABC, XYZ, TL, TR, TL2, TR2, SELECT, START, MODE, THUMBL, THUMBR,
+           * and an unassigned button code */
+          /* 0x100 */ ZEROx4, 0x00, 0x00, 0xff, 0xff,
+      },
+    },
     {
       .name = "Switch Pro Controller via USB",
       .bus_type = 0x0003,