SDL_HINT_APPLE_TV_CONTROLLER_UI_EVENTS(3)

๐Ÿ’– SDL_HINT_APPLE_TV_CONTROLLER_UI_EVENTS ๐Ÿ’–

okay bestie, welcome to the SDL3 FUNCTIONS section of the manual, and today's main character is SDL_HINT_APPLE_TV_CONTROLLER_UI_EVENTS ๐ŸŽ๐Ÿ“บ


โœจ NAME โœจ

SDL_HINT_APPLE_TV_CONTROLLER_UI_EVENTS โ€” a variable that controls whether controllers used with the Apple TV generate UI events ๐ŸŽฎ๐Ÿ’…


๐ŸŒธ SYNOPSIS ๐ŸŒธ

#include <SDL3/SDL_hints.h>

#define SDL_HINT_APPLE_TV_CONTROLLER_UI_EVENTS "SDL_APPLE_TV_CONTROLLER_UI_EVENTS"

๐Ÿฆ‹ DESCRIPTION ๐Ÿฆ‹

so here's the tea โ˜• โ€” when UI events are generated by controller input, the app will get backgrounded when the Apple TV remote's menu button is pressed, and also when the pause or B buttons on gamepads are pressed. literally just yeeted to the background, no cap ๐Ÿ˜ญ

if you want more info about properly making use of controllers for the Apple TV, it's all right here:

https://developer.apple.com/tvos/human-interface-guidelines/remote-and-controllers/

the variable can be set to the following values, bestie:

  • "0" โ€” controller input does not generate UI events. (this is the default ๐Ÿ‘‘)
  • "1" โ€” controller input does generate UI events. slay โœจ
this hint can be set anytime, so you're never locked out fr fr ๐Ÿซถ

โญ AVAILABILITY โญ

this hint is available since SDL 3.2.0 โ€” so if you're on anything older, it's giving vintage, and not in the cute way ๐Ÿ™ˆ


and that's the whole vibe check ๐Ÿ’œ made with love by Simple Directmedia Layer, hanging out in SDL 3.4.18. go forth and press buttons, icon queen ๐Ÿ‘‘๐Ÿ’…๐ŸŽ€

๐Ÿ“ฆ where this page comes from