Skip to content

Commit d1ad11c

Browse files
committed
sinput: fix setting RGB without a player led
There is a bug where SInput checks for player led capability before setting RGB. This means that if a controller does not have a player led, RGB commands are not sent.
1 parent 83818ee commit d1ad11c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/joystick/hidapi/SDL_hidapi_sinput.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -632,7 +632,7 @@ static bool HIDAPI_DriverSInput_SetJoystickLED(SDL_HIDAPI_Device *device, SDL_Jo
632632
{
633633
SDL_DriverSInput_Context *ctx = (SDL_DriverSInput_Context *)device->context;
634634

635-
if (ctx->player_leds_supported) {
635+
if (ctx->joystick_rgb_supported) {
636636

637637
// Set player number, finalizing the setup
638638
Uint8 joystickRGBCommand[SINPUT_DEVICE_REPORT_COMMAND_SIZE] = { SINPUT_DEVICE_REPORT_ID_OUTPUT_CMDDAT, SINPUT_DEVICE_COMMAND_JOYSTICKRGB, red, green, blue };

0 commit comments

Comments
 (0)