SDL: Added SDL_SendGamepadEffect() support for the new Steam Controller

From 4884dbbe5610d6cd444b03ee694e63f086fa5825 Mon Sep 17 00:00:00 2001
From: Sam Lantinga <[EMAIL REDACTED]>
Date: Wed, 13 May 2026 20:14:50 -0700
Subject: [PATCH] Added SDL_SendGamepadEffect() support for the new Steam
 Controller

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

diff --git a/src/joystick/hidapi/SDL_hidapi_steam_triton.c b/src/joystick/hidapi/SDL_hidapi_steam_triton.c
index b911dae02e844..812a9c4059f58 100644
--- a/src/joystick/hidapi/SDL_hidapi_steam_triton.c
+++ b/src/joystick/hidapi/SDL_hidapi_steam_triton.c
@@ -475,6 +475,13 @@ static bool HIDAPI_DriverSteamTriton_SetJoystickLED(SDL_HIDAPI_Device *device, S
 
 static bool HIDAPI_DriverSteamTriton_SendJoystickEffect(SDL_HIDAPI_Device *device, SDL_Joystick *joystick, const void *data, int size)
 {
+    if (size == HID_FEATURE_REPORT_BYTES) {
+        int rc = SDL_hid_send_feature_report(device->dev, data, size);
+        if (rc != size) {
+            return false;
+        }
+        return true;
+    }
     return SDL_Unsupported();
 }