SDL_HINT_JOYSTICK_HIDAPI_JOYCON_HOME_LED(3)

πŸ’– SDL_HINT_JOYSTICK_HIDAPI_JOYCON_HOME_LED πŸ’–

okay bestie, welcome to the SDL3 FUNCTIONS manual, page three of SDL_HINT_JOYSTICK_HIDAPI_JOYCON_HOME_LED. yes the name is a whole mouthful, we're gonna get through it together 🫢


✨ NAME ✨

SDL_HINT_JOYSTICK_HIDAPI_JOYCON_HOME_LED β€” it's a variable that controls whether the Home button LED should be turned on when a Nintendo Switch Joy-Con controller is opened. that's it, that's the whole vibe πŸŽ€


🌸 SYNOPSIS 🌸

#include <SDL3/SDL_hints.h>

#define SDL_HINT_JOYSTICK_HIDAPI_JOYCON_HOME_LED "SDL_JOYSTICK_HIDAPI_JOYCON_HOME_LED"

no cap, that's literally the entire synopsis. include the header, and the macro string is the hint name exactly as written πŸ’…


πŸ¦‹ DESCRIPTION πŸ¦‹

so the variable can be set to the following values, and honestly there's only two of them so it's giving easy:

  • "0" β€” home button LED is turned off πŸ”Œ
  • "1" β€” home button LED is turned on ✨
by default the Home button LED state is not changed. like, it just minds its own business, no notes πŸ™ˆ

plot twist though: this hint can also be set to a floating point value between 0.0 and 1.0, and that controls the brightness of the Home button LED. so yeah, you can dim it, you can blast it, you have options queen πŸ‘‘

and the best part? this hint can be set anytime. no weird timing rules, no "only before init" nonsense. set it whenever, king πŸ’œ


πŸ‘‘ AVAILABILITY πŸ‘‘

this hint is available since SDL 3.2.0. if you're on anything older, sorry bestie, it's not there yet 😭


anyway that's the page!! go make your Joy-Con glow exactly how you want it, you're the main character of your own HIDAPI era 🌈

this has been Simple Directmedia Layer, SDL 3.4.18, signed off with love and a lil sparkle β€” stay iconic, mwah πŸ’…πŸ’–

πŸ“¦ where this page comes from