sdlGameControllerIsSensorEnabled function

bool sdlGameControllerIsSensorEnabled(
  1. Pointer<SdlGameController> gamecontroller,
  2. int type
)

Query whether sensor data reporting is enabled for a game controller.

\param gamecontroller The controller to query \param type The type of sensor to query \returns SDL_TRUE if the sensor is enabled, SDL_FALSE otherwise.

\since This function is available since SDL 2.0.14.

extern DECLSPEC SDL_bool SDLCALL SDL_GameControllerIsSensorEnabled(SDL_GameController *gamecontroller, SDL_SensorType type)

Implementation

bool sdlGameControllerIsSensorEnabled(
    Pointer<SdlGameController> gamecontroller, int type) {
  final sdlGameControllerIsSensorEnabledLookupFunction = libSdl2.lookupFunction<
      Int32 Function(Pointer<SdlGameController> gamecontroller, Int32 type),
      int Function(Pointer<SdlGameController> gamecontroller,
          int type)>('SDL_GameControllerIsSensorEnabled');
  return sdlGameControllerIsSensorEnabledLookupFunction(gamecontroller, type) ==
      1;
}