SDL_GetVideoInfo(3)

πŸ’– SDL_GetVideoInfo(3) πŸ’–

okay bestie, welcome to the SDL API Reference β€” this one's a lil baby page but it's lowkey iconic, so let's get into it πŸŽ€


✨ NAME ✨

SDL_GetVideoInfo β€” hands you a pointer to all the tea about your video hardware πŸ‘€πŸ’…


🌸 SYNOPSIS 🌸

#include "SDL.h"

SDL_VideoInfo *SDL_GetVideoInfo(void);

like, that's the whole thing. no arguments, no drama, just vibes πŸ¦‹


🫢 DESCRIPTION 🫢

so basically this function returns a read-only pointer to info about the video hardware. read-only, okay?? do NOT go messing with what it points at, that's not yours, that's the library's 🚫✨

and here's the part where it gets interesting: if you call this before SDL_SetVideoMode, the vfmt member of the returned structure will contain the pixel format of the "best" video mode. best in quotes, bestie β€” that's SDL deciding what's best, not you πŸ’€

so like, call it early, get the glow-up preview of what your video mode is gonna be πŸ‘‘


🌈 SEE ALSO 🌈

  • SDL_SetVideoMode
  • SDL_VideoInfo

go read those too, they're the main characters here and this page is literally just the bestie hyping them up πŸ§šπŸ’œ


and that's a wrap!! this lil page came straight out of the SDL crew, dated Tue 11 Sep 2001, 23:01 β€” shoutout to the whole SDL API Reference family, mwah πŸ’–πŸ’‹ periodt.

πŸ“¦ where this page comes from