SDL_GetSystemTheme(3)

πŸ¦‹ NAME πŸ¦‹

okay so bestie, meet SDL_GetSystemTheme β€” the little function that tells you the current system theme. Like, is your OS serving light mode, dark mode, or just being mysterious? It lives in the SDL3 FUNCTIONS manual, page SDL_GetSystemTheme(3), and it's giving "let me peek at your aesthetic" energy. πŸ’…


✨ SYNOPSIS ✨

#include <SDL3/SDL_video.h>

SDL_SystemTheme SDL_GetSystemTheme(void);

no arguments, no drama, just call it and get the tea. 🫢


πŸ’– RETURN VALUE πŸ’–

Returns the current system theme, which is one of light, dark, or unknown. The return type is SDL_SystemTheme. If it comes back unknown, don't spiral β€” the system just isn't telling you rn, and that's valid. 😭


🧡 THREAD SAFETY 🧡

⚠️ bestie, listen closely: this function should only be called on the main thread. Not a side thread, not a background vibe, not some little async goblin. Main thread or it's a no-no. πŸ’€

🌈 AVAILABILITY 🌈

This function is available since SDL 3.2.0. So if you're on anything older, it's simply not giving. upgrade era, periodt. ✨


Simple Directmedia Layer, SDL 3.4.18 β€” and the date? not a single one on this page, she's timeless, an icon, a legend. mwah πŸ’‹πŸ‘‘

πŸ“¦ where this page comes from