SDL_SetJoystickEventsEnabled(3)
๐ SDL_SetJoystickEventsEnabled ๐
ok so bestie, welcome to the SDL_SetJoystickEventsEnabled(3) page, living in the SDL3 FUNCTIONS section of your local man pages. grab a snack, we're talking joystick events ๐ฎโจ
๐ธ NAME ๐ธ
SDL_SetJoystickEventsEnabled โ set the state of joystick event processing. that's it, that's the whole job. no cap.
โจ SYNOPSIS โจ
#include <SDL3/SDL_joystick.h>
void SDL_SetJoystickEventsEnabled(bool enabled);
she's short, she's sweet, she takes one bool and returns absolutely nothing (void, icon behaviour ๐
).
๐ฆ DESCRIPTION ๐ฆ
here's the tea, bestie. if joystick events are disabled, then you are on your own โ you have to call SDL_UpdateJoysticks() yourself, and check the state of the joystick yourself, whenever you actually want joystick information.
like. the events aren't gonna come to you. you gotta go get them. main character energy only, no waiting around ๐
๐ FUNCTION PARAMETERS ๐
enabledโ whether to process joystick events or not.true= yes bestie, process them.false= nope, we're doing this manually now.
๐ THREAD SAFETY ๐
it is safe to call this function from any thread. periodt. go wild, thread it from wherever, it's fine ๐
โญ AVAILABILITY โญ
this function is available since SDL 3.2.0. if you're on something older, sorry babe, it's not there ๐ฅฒ
๐ SEE ALSO ๐
ngl if you turned events off and then forgot to call SDL_UpdateJoysticks(), your joystick is just gonna sit there silently. that's on you, not on SDL ๐ซถ
and that's the whole page, bestie!! brought to you by Simple Directmedia Layer, SDL version 3.4.18 โ shoutout to whoever wrote the docs, mwah, love that for them ๐๐๐ฆ๐ธโจ
๐ฆ 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