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_SetVideoModeSDL_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
- debian bookworm: libsdl1.2-dev 1.2.15+dfsg2-8 Β· LGPL-2.1-or-later
- nixos 26.05: SDL_sixel 0-unstable-2016-02-06
- nixpkgs unstable: SDL_sixel 0-unstable-2016-02-06
- ubuntu jammy: libsdl1.2-dev 1.2.15+dfsg2-6 Β· LGPL-2.1-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms