sdlSensorOpen function

Pointer<SdlSensor> sdlSensorOpen(
  1. int deviceIndex
)

Open a sensor for use.

\param device_index The sensor to open \returns an SDL_Sensor sensor object, or NULL if an error occurred.

\since This function is available since SDL 2.0.9.

extern DECLSPEC SDL_Sensor *SDLCALL SDL_SensorOpen(int device_index)

Implementation

Pointer<SdlSensor> sdlSensorOpen(int deviceIndex) {
  final sdlSensorOpenLookupFunction = libSdl2.lookupFunction<
      Pointer<SdlSensor> Function(Int32 deviceIndex),
      Pointer<SdlSensor> Function(int deviceIndex)>('SDL_SensorOpen');
  return sdlSensorOpenLookupFunction(deviceIndex);
}