sdlGameControllerGetType function

int sdlGameControllerGetType(
  1. Pointer<SdlGameController> gamecontroller
)

Get the type of this currently opened controller

This is the same name as returned by SDL_GameControllerTypeForIndex(), but it takes a controller identifier instead of the (unstable) device index.

\param gamecontroller the game controller object to query. \returns the controller type.

\since This function is available since SDL 2.0.12.

extern DECLSPEC SDL_GameControllerType SDLCALL SDL_GameControllerGetType(SDL_GameController *gamecontroller)

Implementation

int sdlGameControllerGetType(Pointer<SdlGameController> gamecontroller) {
  final sdlGameControllerGetTypeLookupFunction = libSdl2.lookupFunction<
          Int32 Function(Pointer<SdlGameController> gamecontroller),
          int Function(Pointer<SdlGameController> gamecontroller)>(
      'SDL_GameControllerGetType');
  return sdlGameControllerGetTypeLookupFunction(gamecontroller);
}