sdlSensorGetType function

int sdlSensorGetType(
  1. Pointer<SdlSensor> sensor
)

Get the type of a sensor.

\param sensor The SDL_Sensor object to inspect \returns the SDL_SensorType type, or SDL_SENSOR_INVALID if sensor is NULL.

\since This function is available since SDL 2.0.9.

extern DECLSPEC SDL_SensorType SDLCALL SDL_SensorGetType(SDL_Sensor *sensor)

Implementation

int sdlSensorGetType(Pointer<SdlSensor> sensor) {
  final sdlSensorGetTypeLookupFunction = libSdl2.lookupFunction<
      Int32 Function(Pointer<SdlSensor> sensor),
      int Function(Pointer<SdlSensor> sensor)>('SDL_SensorGetType');
  return sdlSensorGetTypeLookupFunction(sensor);
}