Function SDL_SetGamepadLED
pub unsafe extern "C" fn SDL_SetGamepadLED(
gamepad: *mut SDL_Gamepad,
red: u8,
green: u8,
blue: u8,
) -> bool
Available on crate feature
dep_sdl3
only.Expand description
Update a gamepad’s LED color.
An example of a joystick LED is the light on the back of a PlayStation 4’s DualShock 4 controller.
For gamepads with a single color LED, the maximum of the RGB values will be used as the LED brightness.
§Parameters
gamepad
: the gamepad to update.red
: the intensity of the red LED.green
: the intensity of the green LED.blue
: the intensity of the blue LED.
§Return value
Returns true on success or false on failure; call SDL_GetError()
for more
information.
§Availability
This function is available since SDL 3.2.0.