sdlGameControllerSetLed function

int sdlGameControllerSetLed(
  1. Pointer<SdlGameController> gamecontroller,
  2. int red,
  3. int green,
  4. int blue,
)

Update a game controller's LED color.

\param gamecontroller The controller 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, or -1 if this controller does not have a modifiable LED

\since This function is available since SDL 2.0.14.

extern DECLSPEC int SDLCALL SDL_GameControllerSetLED(SDL_GameController *gamecontroller, Uint8 red, Uint8 green, Uint8 blue)

Implementation

int sdlGameControllerSetLed(
    Pointer<SdlGameController> gamecontroller, int red, int green, int blue) {
  final sdlGameControllerSetLedLookupFunction = libSdl2.lookupFunction<
      Int32 Function(Pointer<SdlGameController> gamecontroller, Uint8 red,
          Uint8 green, Uint8 blue),
      int Function(Pointer<SdlGameController> gamecontroller, int red,
          int green, int blue)>('SDL_GameControllerSetLED');
  return sdlGameControllerSetLedLookupFunction(
      gamecontroller, red, green, blue);
}