SDL_JoystickEventState(3)
๐ SDL_JoystickEventState(3) ๐
okay bestie, welcome to the SDL API Reference โจ this one lives in the SDL manual, section 3, and it's literally the on/off switch for joystick event polling ๐ฎ๐ฆ
๐ธ NAME ๐ธ
SDL_JoystickEventState โ turn joystick event polling on or off ๐
โจ SYNOPSIS โจ
#include "SDL.h"
int SDL_JoystickEventState(int state);
๐ DESCRIPTION ๐
so like, this function is the girl when it comes to enabling or disabling joystick event processing ๐ซถ
when joystick event processing is disabled, no events are gonna come find you โ you have to go get them yourself. that means you update the joystick states with SDL_JoystickUpdate and read the joystick info manually, like a main character doing her own detective work ๐โจ
and state? it's one of three iconic options:
SDL_QUERYโ ask, don't tell ๐ฌSDL_ENABLEโ yes ma'am, turn it on ๐SDL_IGNOREโ nope, we're off duty ๐
Note: Joystick event handling is prefered (that's their spelling, not mine, and we respect the icon's choices ๐๐)
๐ฅ RETURN VALUE ๐ฅ
- if
stateisSDL_QUERY, you get the current state back ๐ - otherwise, you get the new processing state back โจ
either way bestie, you're getting a return value, no crumbs ๐
๐ SEE ALSO ๐
- SDL Joystick Functions
SDL_JoystickUpdateSDL_JoyAxisEventSDL_JoyBallEventSDL_JoyButtonEventSDL_JoyHatEvent
and that's the whole vibe ๐ this page came from the SDL manual, dated Tue 11 Sep 2001, 22:59 โ yes, she's an elder icon and she still ate ๐ go forth and poll your joysticks, ily, bye ๐๐๐ฆ
๐ฆ where this page comes from
- debian bookworm: libsdl1.2-dev 1.2.15+dfsg2-8 ยท LGPL-2.1-or-later
- nixos 26.05: SDL_sixel 0-unstable-2016-02-06
- nixpkgs unstable: SDL_sixel 0-unstable-2016-02-06
- ubuntu jammy: libsdl1.2-dev 1.2.15+dfsg2-6 ยท LGPL-2.1-or-later
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms