SDL_SetHapticAutocenter(3)
π SDL_SetHapticAutocenter(3) π
okay bestie, welcome to the SDL3 FUNCTIONS corner of the manual, where today we're talking about SDL_SetHapticAutocenter β yes, the girlies are setting the global autocenter of the device and we're gonna talk about it β¨
πΈ NAME πΈ
SDL_SetHapticAutocenter β set the global autocenter of the device π
β¨ SYNOPSIS β¨
#include <SDL3/SDL_haptic.h>
bool SDL_SetHapticAutocenter(SDL_Haptic *haptic, int autocenter);
there she is. the whole signature. no notes, she's perfect π
π¦ DESCRIPTION π¦
so here's the tea: that autocenter value should be between 0 and 100. Setting it to 0 will disable autocentering β like, fully off, gone, no more pull-back-to-center energy π
β οΈ real talk though: the device must support the SDL_HAPTIC_AUTOCENTER feature. No support, no autocenter. that's just the rules, bestie π
π FUNCTION PARAMETERS π
hapticβ theSDL_Hapticdevice you're setting autocentering on π«Άautocenterβ the value you wanna set autocenter to (0-100) β
π₯ RETURN VALUE π₯
she gives back true on success or false on failure β and if it's a fail, call SDL_GetError() for more info, because she will absolutely tell you what went wrong π
π AVAILABILITY π
this function is available since SDL 3.2.0 β so if you're on something older, sorry babe, no autocenter for you π§
π SEE ALSO π
SDL_GetHapticFeatures(3)β go read her next, she's iconic π
and that's the whole page, bestie!! this absolute banger of a manpage came to you courtesy of Simple Directmedia Layer, version SDL 3.4.18 β mwah, go set some autocenter, slay, periodt π β¨π
π¦ where this page comes from
- fedora 43: SDL3-devel 3.4.18-1.fc43 Β· Zlib AND MIT AND Apache-2.0 AND (Apache-2.0 OR MIT)
- fedora 43: SDL3-devel 3.4.18-1.fc43 Β· Zlib AND MIT AND Apache-2.0 AND (Apache-2.0 OR MIT)
- fedora 44: SDL3-devel 3.4.18-1.fc44 Β· Zlib AND MIT AND Apache-2.0 AND (Apache-2.0 OR MIT)
- fedora 44: SDL3-devel 3.4.18-1.fc44 Β· Zlib AND MIT AND Apache-2.0 AND (Apache-2.0 OR MIT)
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms