SDL: Make sure we wait after sending the rumble packet when initializing the PowerA Xbox One Mini Wired Controller

From e7a56323ab78c3bd7cbe967b07ba5f8d4457230a Mon Sep 17 00:00:00 2001
From: Sam Lantinga <[EMAIL REDACTED]>
Date: Sun, 6 Nov 2022 01:43:05 -0700
Subject: [PATCH] Make sure we wait after sending the rumble packet when
 initializing the PowerA Xbox One Mini Wired Controller

---
 src/joystick/hidapi/SDL_hidapi_xboxone.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/src/joystick/hidapi/SDL_hidapi_xboxone.c b/src/joystick/hidapi/SDL_hidapi_xboxone.c
index 770be6d51f5a..ea1a5bc5f5ad 100644
--- a/src/joystick/hidapi/SDL_hidapi_xboxone.c
+++ b/src/joystick/hidapi/SDL_hidapi_xboxone.c
@@ -317,6 +317,11 @@ SendControllerInit(SDL_HIDAPI_Device *device, SDL_DriverXboxOne_Context *ctx)
         if (packet->response[0]) {
             return SDL_TRUE;
         }
+
+        /* Wait to process the rumble packet */
+        if (packet->data == xboxone_powera_rumble_init) {
+            SDL_Delay(10);
+        }
     }
 
     /* All done with the negotiation, prepare for input! */