sdlSensorGetInstanceId function

int sdlSensorGetInstanceId(
  1. Pointer<SdlSensor> sensor
)

Get the instance ID of a sensor.

\param sensor The SDL_Sensor object to inspect \returns the sensor instance ID, or -1 if sensor is NULL.

\since This function is available since SDL 2.0.9.

extern DECLSPEC SDL_SensorID SDLCALL SDL_SensorGetInstanceID(SDL_Sensor *sensor)

Implementation

int sdlSensorGetInstanceId(Pointer<SdlSensor> sensor) {
  final sdlSensorGetInstanceIdLookupFunction = libSdl2.lookupFunction<
      Int32 Function(Pointer<SdlSensor> sensor),
      int Function(Pointer<SdlSensor> sensor)>('SDL_SensorGetInstanceID');
  return sdlSensorGetInstanceIdLookupFunction(sensor);
}