SDL: testevdev: Add details of X-Box One Elite 2 via USB

From 56ba7f2ff073b50f82d28f98667c2d14845750fd Mon Sep 17 00:00:00 2001
From: Simon McVittie <[EMAIL REDACTED]>
Date: Tue, 13 Jun 2023 16:53:56 +0100
Subject: [PATCH] testevdev: Add details of X-Box One Elite 2 via USB

Thanks to iacore for capturing these.

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 35b7a9e9af42..cf395cf62d9b 100644
--- a/test/testevdev.c
+++ b/test/testevdev.c
@@ -127,6 +127,30 @@ static const GuessTest guess_tests[] =
           /* 0x100 */ ZEROx4, 0x00, 0x00, 0xdb, 0x7c,
       },
     },
+    { /* Reference: https://github.com/libsdl-org/SDL/issues/7814 */
+      .name = "X-Box One Elite 2",
+      .bus_type = 0x0003,
+      .vendor_id = 0x045e,
+      .product_id = 0x0b00,
+      .expected = SDL_UDEV_DEVICE_JOYSTICK,
+      /* SYN, KEY, ABS, FF */
+      .ev = { 0x0b, 0x00, 0x20 },
+      /* X, Y, Z, RX, RY, RZ, HAT0X, HAT0Y */
+      .abs = { 0x3f, 0x00, 0x03 },
+      .keys = {
+          /* 0x00-0xff */ ZEROx8, ZEROx8, ZEROx8, ZEROx8,
+          /* A, B, X, Y, TL, TR, SELECT, START, MODE, THUMBL, THUMBR */
+          /* 0x100 */ ZEROx4, 0x00, 0x00, 0xdb, 0x7c,
+          /* 0x140 */ ZEROx8,
+          /* 0x180 */ ZEROx8,
+          /* 0x1c0 */ ZEROx8,
+          /* 0x200 */ ZEROx8,
+          /* 0x240 */ ZEROx8,
+          /* 0x280 */ ZEROx8,
+          /* BTN_TRIGGER_HAPPY5 up to BTN_TRIGGER_HAPPY8 inclusive */
+          /* 0x2c0 */ 0xf0,
+      },
+    },
     {
       .name = "X-Box One S via Bluetooth",
       .bus_type = 0x0005,