SDL_IsTV(3)

πŸ’– SDL_IsTV(3) πŸ’–

okay so bestie, welcome to the SDL3 FUNCTIONS section of the manual, and today's main character is SDL_IsTV πŸ’…


✨ NAME ✨

SDL_IsTV β€” the lil vibe check that tells you whether the device you're on right now is, in fact, a TV πŸ“Ίβœ¨


🌸 SYNOPSIS 🌸

#include <SDL3/SDL_system.h>

bool SDL_IsTV(void);

like yes, that's the whole thing. no arguments, no nothing. she's simple, she's clean, she ate 🫢


πŸ¦‹ DESCRIPTION πŸ¦‹

so basically: SDL_IsTV queries whether the current device is a TV. that's it. that's the job. iconic behaviour honestly πŸ‘‘

and here's the little plot twist you need to know: if SDL can't determine whether it's a TV or not, it just returns false. no drama, no error, no crash β€” just a quiet lil "eh, probably not" πŸ™ˆ


⭐ RETURN VALUE ⭐

  • Returns true if the device is a TV πŸ’–
  • Returns false otherwise 🌸

🧚 THREAD SAFETY 🧚

good news, bestie: it is safe to call this function from any thread. so go off, call her from wherever you want, she does not care, she is unbothered, she is thriving ✨


🌈 AVAILABILITY 🌈

this function has been available since SDL 3.2.0. if you're on anything older, she's not there yet, no cap 😭


reminder to my beloved: false doesn't always mean "definitely not a TV" β€” sometimes it means "SDL genuinely could not figure it out." keep that in mind before you make life choices based on it πŸ’€

and that's the whole page, periodt. this gem comes to you courtesy of Simple Directmedia Layer, sitting pretty at SDL 3.4.18 β€” go be a TV, or don't, either way you're slaying πŸ’œ

πŸ“¦ where this page comes from