logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

SDL_HapticCustom - A structure containing a template for the SDL_HAPTIC_CUSTOM effect.

Availability

       This struct is available since SDL 3.2.0.

Description

       This struct is exclusively for the SDL_HAPTIC_CUSTOM effect.

       A custom force feedback effect is much like a periodic effect, where the application can define its exact
       shape.  You  will  have  to  allocate the data yourself. Data should consist of channels * samples Uint16
       samples.

       If channels is one, the effect is rotated using the defined direction. Otherwise it uses the  samples  in
       data for the different axes.

Name

       SDL_HapticCustom - A structure containing a template for the SDL_HAPTIC_CUSTOM effect.

See Also

SDL_HAPTIC_CUSTOM(3), SDL_HapticEffect(3type)

Simple Directmedia Layer                           SDL 3.2.20                            SDL_HapticCustom(3type)

Synopsis

#include<SDL3/SDL_haptic.h>typedefstructSDL_HapticCustom{/*Header*/Uint16type;/**<SDL_HAPTIC_CUSTOM*/SDL_HapticDirectiondirection;/**<Directionoftheeffect.*//*Replay*/Uint32length;/**<Durationoftheeffect.*/Uint16delay;/**<Delaybeforestartingtheeffect.*//*Trigger*/Uint16button;/**<Buttonthattriggerstheeffect.*/Uint16interval;/**<Howsoonitcanbetriggeredagainafterbutton.*//*Custom*/Uint8channels;/**<Axestouse,minimumofone.*/Uint16period;/**<Sampleperiods.*/Uint16samples;/**<Amountofsamples.*/Uint16*data;/**<Shouldcontainchannels*samplesitems.*//*Envelope*/Uint16attack_length;/**<Durationoftheattack.*/Uint16attack_level;/**<Levelatthestartoftheattack.*/Uint16fade_length;/**<Durationofthefade.*/Uint16fade_level;/**<Levelattheendofthefade.*/}SDL_HapticCustom;

See Also