sdlSensorGetDeviceType function

int sdlSensorGetDeviceType(
  1. int deviceIndex
)

Get the type of a sensor.

\param device_index The sensor to get the type from \returns the SDL_SensorType, or SDL_SENSOR_INVALID if device_index is out of range.

\since This function is available since SDL 2.0.9.

extern DECLSPEC SDL_SensorType SDLCALL SDL_SensorGetDeviceType(int device_index)

Implementation

int sdlSensorGetDeviceType(int deviceIndex) {
  final sdlSensorGetDeviceTypeLookupFunction = libSdl2.lookupFunction<
      Int32 Function(Int32 deviceIndex),
      int Function(int deviceIndex)>('SDL_SensorGetDeviceType');
  return sdlSensorGetDeviceTypeLookupFunction(deviceIndex);
}