sdlGetNumTouchDevices function

int sdlGetNumTouchDevices()

Get the number of registered touch devices.

On some platforms SDL first sees the touch device if it was actually used. Therefore SDL_GetNumTouchDevices() may return 0 although devices are available. After using all devices at least once the number will be correct.

This was fixed for Android in SDL 2.0.1.

\returns the number of registered touch devices.

\since This function is available since SDL 2.0.0.

\sa SDL_GetTouchDevice

extern DECLSPEC int SDLCALL SDL_GetNumTouchDevices(void)

Implementation

int sdlGetNumTouchDevices() {
  final sdlGetNumTouchDevicesLookupFunction =
      libSdl2.lookupFunction<Int32 Function(), int Function()>(
          'SDL_GetNumTouchDevices');
  return sdlGetNumTouchDevicesLookupFunction();
}