openHaptic method

Haptic openHaptic(
  1. int index
)

Open a haptic device for use.

SDL Docs

Implementation

Haptic openHaptic(final int index) {
  final handle = sdl.SDL_HapticOpen(index);
  if (handle == nullptr) {
    throw SdlError(-1, getError());
  }
  return Haptic(this, handle);
}