[−][src]Function sdl2_sys::SDL_HapticOpenFromJoystick
pub unsafe extern "C" fn SDL_HapticOpenFromJoystick(
joystick: *mut SDL_Joystick
) -> *mut SDL_Haptic
\brief Opens a haptic device for use from a joystick device.
You must still close the haptic device separately. It will not be closed with the joystick.
When opening from a joystick you should first close the haptic device before closing the joystick device. If not, on some implementations the haptic device will also get unallocated and you'll be unable to use force feedback on that device.
\param joystick Joystick to create a haptic device from. \return A valid haptic device identifier on success or NULL on error.
\sa SDL_HapticOpen \sa SDL_HapticClose