SDL_JoystickType(3type)

πŸ’– NAME πŸ’–

okay so SDL_JoystickType β€” it's an enum, bestie. an enum of some common joystick types. that's the whole vibe. ✨


πŸŽ€ SYNOPSIS πŸŽ€

like, here's literally what you write:

#include <SDL3/SDL_joystick.h>

typedef enum SDL_JoystickType
{
    SDL_JOYSTICK_TYPE_UNKNOWN,
    SDL_JOYSTICK_TYPE_GAMEPAD,
    SDL_JOYSTICK_TYPE_WHEEL,
    SDL_JOYSTICK_TYPE_ARCADE_STICK,
    SDL_JOYSTICK_TYPE_FLIGHT_STICK,
    SDL_JOYSTICK_TYPE_DANCE_PAD,
    SDL_JOYSTICK_TYPE_GUITAR,
    SDL_JOYSTICK_TYPE_DRUM_KIT,
    SDL_JOYSTICK_TYPE_ARCADE_PAD,
    SDL_JOYSTICK_TYPE_THROTTLE,
    SDL_JOYSTICK_TYPE_COUNT
} SDL_JoystickType;

look at all those little guys. πŸ¦‹ one for every era of your gaming life, fr fr.


🌸 DESCRIPTION 🌸

so sometimes SDL is lowkey psychic and can tell that a low-level joystick is a certain type of device, and it'll report that back to you through SDL_GetJoystickType (or SDL_GetJoystickTypeForID). iconic behavior honestly. πŸ‘‘

and please do not treat this list as the final word, bestie β€” this is by no means a complete list of everything that can be plugged into a computer. people plug the wildest stuff in. πŸ’€

if you want the general ✨lore✨ behind what each joystick type actually means, you may refer to the XInput Controller Types table:

https://learn.microsoft.com/en-us/windows/win32/xinput/xinput-and-controller-subtypes

it's giving reference material. go read it, iykyk. πŸ“–


🌈 AVAILABILITY 🌈

this enum is available since SDL 3.2.0. so if you're on something older… not me, not the vibe check passing. 🫢


🫢 SEE ALSO 🫢

okay there's no SEE ALSO section on this page, bestie, but the functions that use this thing are right up there in the description β€” SDL_GetJoystickType and SDL_GetJoystickTypeForID. go say hi to them. πŸ’…


that's the whole page, no notes. πŸ’œ brought to you by the Simple Directmedia Layer girlies β€” this is SDL 3.4.18, page SDL_JoystickType(3type), and yeah that's the version and the title and the whole footer moment wrapped up in a bow. πŸŽ€ bye bestie, go read your joystick types. ⭐

πŸ“¦ where this page comes from