SDL_HINT_JOYSTICK_HIDAPI_SWITCH2(3)
โจ SDL_HINT_JOYSTICK_HIDAPI_SWITCH2 โจ
okay bestie, so this is a page from the SDL3 function manual, and it's all about one lil hint variable with a big name: SDL_HINT_JOYSTICK_HIDAPI_SWITCH2 ๐
It's the switch that decides whether the HIDAPI driver for Nintendo Switch 2 controllers should be used. that's it. that's the whole vibe check. ๐ฎโจ
๐ธ SYNOPSIS ๐ธ
#include <SDL3/SDL_hints.h>
#define SDL_HINT_JOYSTICK_HIDAPI_SWITCH2 "SDL_JOYSTICK_HIDAPI_SWITCH2"
like yes, the macro name and the string are literally identical, she's consistent, we love that for her ๐
๐ DESCRIPTION ๐
So this variable can be set to the following values, and there are exactly two of them, no more no less:
"0"โ HIDAPI driver is not used. nope. not happening. ๐"1"โ HIDAPI driver is used. slay. ๐
The default? It's the value of SDL_HINT_JOYSTICK_HIDAPI โ so if you never touched this one, she just copies whatever her big sibling hint says. inherited behavior, iconic honestly. ๐ซถ
โ ๏ธ important bestie: this hint should be set before initializing joysticks and gamepads. set it after and, well, it's giving too late. ๐ญ
๐ AVAILABILITY ๐
This hint has been available since SDL 3.4.0. so if you're on anything older, no she's not there, sorry. ๐
and that's the whole page, fr fr ๐ฆ
Simple Directmedia Layer brought you this one, sitting pretty at SDL 3.4.18 โ mwah, take care of your Switch 2 controllers, and remember: hints first, init after. 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