SDL_HINT_TV_REMOTE_AS_JOYSTICK(3)

๐Ÿ’– SDL_HINT_TV_REMOTE_AS_JOYSTICK ๐Ÿ’–

okay bestie, welcome to the SDL3 FUNCTIONS corner of the manual, where we're talking about one very specific little hint: SDL_HINT_TV_REMOTE_AS_JOYSTICK. she's a variable, she controls a vibe, and she is lowkey iconic for it. let's get into it ๐ŸŽ€


โœจ NAME โœจ

SDL_HINT_TV_REMOTE_AS_JOYSTICK โ€” a variable controlling whether the Android / tvOS remotes should be listed as joystick devices, instead of sending keyboard events.

like. it decides if your remote gets to be a joystick or a keyboard. that's the whole thing. no cap. ๐Ÿ•น๏ธ


๐Ÿฆ‹ SYNOPSIS ๐Ÿฆ‹

#include <SDL3/SDL_hints.h>

#define SDL_HINT_TV_REMOTE_AS_JOYSTICK "SDL_TV_REMOTE_AS_JOYSTICK"

so you pull in the header, and the hint name itself literally spells out as the string "SDL_TV_REMOTE_AS_JOYSTICK". cute, consistent, we love a self-documenting macro ๐Ÿ’…


๐ŸŒธ DESCRIPTION ๐ŸŒธ

okay so here's the tea โ˜• โ€” this variable can be set to the following values:

  • "0" โ€” Remotes send enter/escape/arrow key events. so your remote is out here typing at you like a lil keyboard. classic. โŒจ๏ธ
  • "1" โ€” Remotes are available as 2 axis, 2 button joysticks. this is the default, bestie, so if you don't touch anything this is what you get. two axes, two buttons, joystick era. ๐ŸŽฎโœจ
important timing note: this hint should be set before SDL is initialized. set it late and it's giving "oops", so do it early, okay? ๐Ÿซถ

โญ AVAILABILITY โญ

this hint is available since SDL 3.2.0. she's been around a minute, she's settled, she's thriving. ๐Ÿ‘‘


and that's the whole page, babes ๐ŸŒˆ โ€” brought to you by Simple Directmedia Layer, SDL 3.4.18, and this very SDL_HINT_TV_REMOTE_AS_JOYSTICK(3) moment. go set your hint early, slay your remote setup, and remember: joystick by default, keyboard if you say so. mwah ๐Ÿ’–๐ŸŽ€๐Ÿฆ‹

๐Ÿ“ฆ where this page comes from