SDL: Fixed third-party Nintendo Switch Pro controllers shutting down when we try to set the home LED.

From 0c16f4faf00eb573d051cac7d60ed8dd22e5596a Mon Sep 17 00:00:00 2001
From: Sam Lantinga <[EMAIL REDACTED]>
Date: Wed, 14 Jun 2023 10:15:06 -0700
Subject: [PATCH] Fixed third-party Nintendo Switch Pro controllers shutting
 down when we try to set the home LED.

This fixes the PDP Afterglow Wireless Deluxe Controller.
---
 src/joystick/hidapi/SDL_hidapi_switch.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/src/joystick/hidapi/SDL_hidapi_switch.c b/src/joystick/hidapi/SDL_hidapi_switch.c
index 57bbdd914ca0..638e117f0116 100644
--- a/src/joystick/hidapi/SDL_hidapi_switch.c
+++ b/src/joystick/hidapi/SDL_hidapi_switch.c
@@ -1038,6 +1038,11 @@ static SDL_bool HasHomeLED(SDL_DriverSwitch_Context *ctx)
         return SDL_FALSE;
     }
 
+    /* Third party controllers don't have a home LED and will shut off if we try to set it */
+    if (ctx->m_eControllerType == k_eSwitchDeviceInfoControllerType_LicProController) {
+        return SDL_FALSE;
+    }
+
     /* The Nintendo Online classic controllers don't have a Home LED */
     if (vendor_id == USB_VENDOR_NINTENDO &&
         ctx->m_eControllerType > k_eSwitchDeviceInfoControllerType_ProController) {