Scroll to navigation

SDL_HapticNewEffect(3) SDL3 FUNCTIONS SDL_HapticNewEffect(3)

NAME

SDL_HapticNewEffect - Create a new haptic effect on a specified device.

SYNOPSIS

#include "SDL3/SDL.h"
int SDL_HapticNewEffect(SDL_Haptic * haptic,
                        SDL_HapticEffect * effect);

FUNCTION PARAMETERS

an SDL_Haptic
device to create the effect on
an SDL_HapticEffect
structure containing the properties of the effect to create

RETURN VALUE

Returns the ID of the effect on success or a negative error code on failure; call SDL_GetError () for more information.

AVAILABILITY

This function is available since SDL 3.0.0.

SEE ALSO

SDL_HapticDestroyEffect(3), SDL_HapticRunEffect(3), SDL_HapticUpdateEffect(3)

SDL 3.0.0 SDL