SDL_VideoInfo(3)
๐ SDL_VideoInfo โ Video Target information ๐
okay bestie, pull up a chair, because this is the SDL_VideoInfo(3) page from the SDL API Reference and it's literally just a lil struct that tells you everything about your video setup ๐ฆ no cap.
๐ธ STRUCTURE DEFINITION ๐ธ
here's the whole thing, copy it exactly how it is, don't be cute with it:
typedef struct{
Uint32 hw_available:1;
Uint32 wm_available:1;
Uint32 blit_hw:1;
Uint32 blit_hw_CC:1;
Uint32 blit_hw_A:1;
Uint32 blit_sw:1;
Uint32 blit_sw_CC:1;
Uint32 blit_sw_A:1;
Uint32 blit_fill;
Uint32 video_mem;
SDL_PixelFormat *vfmt;
} SDL_VideoInfo;
look at those bitfields. she's serving structure. ๐
โจ STRUCTURE DATA โจ
every single member, one by one, no skipping, we don't do that here:
hw_availableโ can you actually make hardware surfaces? is it possible, yes or no ๐wm_availableโ is there a window manager hanging around?blit_hwโ are hardware-to-hardware blits accelerated? ๐ฅblit_hw_CCโ are hardware-to-hardware colorkey blits accelerated?blit_hw_Aโ are hardware-to-hardware alpha blits accelerated?blit_swโ are software-to-hardware blits accelerated?blit_sw_CCโ are software-to-hardware colorkey blits accelerated?blit_sw_Aโ are software-to-hardware alpha blits accelerated?blit_fillโ are color fills accelerated?video_memโ total amount of video memory, in Kilobytes ๐งฎvfmtโ pixel format of the video device, anSDL_PixelFormat *bestie
๐ซ DESCRIPTION ๐ซ
so this structure is read-only โ hands off, you don't write to it โ and SDL_GetVideoInfo is the one that hands it to you. ๐ซถ
and what's inside? the tea on either:
- the 'best' available mode, if you called it before
SDL_SetVideoMode, or - the current video mode, if you didn't.
that's the whole vibe. one struct, two possible moods, depending on when you ask. main character energy tbh.
ngl the timing thing is the whole point โ ask early and you get the dream scenario, ask late and you get the reality check. ๐
๐ SEE ALSO ๐
SDL_PixelFormatSDL_GetVideoInfo
go read those too, iykyk ๐
and that's the page!! this lil slice of the SDL API Reference is brought to you by SDL, dated Tue 11 Sep 2001, 23:01 โ yes that date, iconic, historic, we respect it. mwah, bye bestie ๐๐
๐ฆ 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