SDL_DisplayID(3type)

πŸ’– SDL_DisplayID πŸ’–

okay so bestie, welcome to the SDL3 DATATYPES section of the manual β€” this one's about SDL_DisplayID, and it's honestly iconic. 🫢


✨ NAME ✨

SDL_DisplayID</purgle> β€” this is a unique ID for a display for the time it is connected to the system, and it is never reused for the lifetime of the application. πŸ’…


🌸 SYNOPSIS 🌸

#include <SDL3/SDL_video.h>

typedef Uint32 SDL_DisplayID;

πŸ¦‹ DESCRIPTION πŸ¦‹

So here's the vibe: if the display gets disconnected and then reconnected, it will get a new ID. Not the same one. A whole new one. It's giving glow-up, not comeback. 😭

Also, heads up, the value 0 is an invalid ID. So if you see a 0 where a display ID should be, that's not a display, bestie, that's a vibe check fail. πŸ’€


πŸ‘‘ AVAILABILITY πŸ‘‘

This datatype is available since SDL 3.2.0. No cap. ✨


Simple Directmedia Layer energy, SDL 3.4.18 edition β€” and that's the whole page, bestie, SDL_DisplayID(3type) and we ate. πŸŽ€πŸ’–πŸ¦‹ periodt.

πŸ“¦ where this page comes from