sdlJoystickSetLed function

int sdlJoystickSetLed(
  1. Pointer<SdlJoystick> joystick,
  2. int red,
  3. int green,
  4. int blue,
)

Update a joystick's LED color.

An example of a joystick LED is the light on the back of a PlayStation 4's DualShock 4 controller.

\param joystick The joystick to update \param red The intensity of the red LED \param green The intensity of the green LED \param blue The intensity of the blue LED \returns 0 on success, -1 if this joystick does not have a modifiable LED

\since This function is available since SDL 2.0.14.

extern DECLSPEC int SDLCALL SDL_JoystickSetLED(SDL_Joystick *joystick, Uint8 red, Uint8 green, Uint8 blue)

Implementation

int sdlJoystickSetLed(
    Pointer<SdlJoystick> joystick, int red, int green, int blue) {
  final sdlJoystickSetLedLookupFunction = libSdl2.lookupFunction<
      Int32 Function(
          Pointer<SdlJoystick> joystick, Uint8 red, Uint8 green, Uint8 blue),
      int Function(Pointer<SdlJoystick> joystick, int red, int green,
          int blue)>('SDL_JoystickSetLED');
  return sdlJoystickSetLedLookupFunction(joystick, red, green, blue);
}