sdlSensorGetDeviceInstanceId function

int sdlSensorGetDeviceInstanceId(
  1. int deviceIndex
)

Get the instance ID of a sensor.

\param device_index The sensor to get instance id from \returns the sensor instance ID, or -1 if device_index is out of range.

\since This function is available since SDL 2.0.9.

extern DECLSPEC SDL_SensorID SDLCALL SDL_SensorGetDeviceInstanceID(int device_index)

Implementation

int sdlSensorGetDeviceInstanceId(int deviceIndex) {
  final sdlSensorGetDeviceInstanceIdLookupFunction = libSdl2.lookupFunction<
      Int32 Function(Int32 deviceIndex),
      int Function(int deviceIndex)>('SDL_SensorGetDeviceInstanceID');
  return sdlSensorGetDeviceInstanceIdLookupFunction(deviceIndex);
}