get_gfx_mode_list(3)
π get_gfx_mode_list β Allegro manual, bestie edition π
okay so this is get_gfx_mode_list(3), a lil function from the Allegro game programming library, and she's here to tell you every single video mode your graphics driver can actually do. no cap. let's get into it π¦
β¨ SYNOPSIS β¨
#include <allegro.h>
GFX_MODE_LIST *get_gfx_mode_list(int card);
πΈ DESCRIPTION πΈ
So like, this function tries to build you a whole list of every supported video mode for a certain graphics driver. and the way it hands it to you is through the GFX_MODE_LIST structure, which literally looks like this:
typedef struct GFX_MODE_LIST
{
int num_modes;
GFX_MODE *mode;
} GFX_MODE_LIST;
the mode entry? that's the one pointing at the actual list of video modes. main character energy honestly π
typedef struct GFX_MODE
{
int width, height, bpp;
} GFX_MODE;
and the list is terminated with an { 0, 0, 0 } entry β so when you hit that triple zero, you've reached the end, periodt. don't keep scrolling bestie, there's nothing after it π
β οΈ big important thing: thecardparameter must refer to a _real_ driver. like, an actual one. this function fails if you passGFX_SAFE,GFX_AUTODETECT, or any other "magic" driver. so no sneaky shortcut vibes here, she needs the real thing π
π«Ά RETURN VALUE π«Ά
She returns a pointer to a list structure of the type GFX_MODE_LIST, or NULL if the request could not be satisfied. that's it. that's the deal. if it's NULL, it's giving "no β€οΈ" and you gotta deal with it π
π SEE ALSO π
and that's the whole page bestie, you ate it up π
this iconic lil manual page was brought to you by Allegro version 4.4.3, filed under get_gfx_mode_list(3) β go forth and enumerate those modes, iykyk β¨ππ
π¦ where this page comes from
- fedora 43: allegro-devel 4.4.3.1-18.fc43 Β· Giftware
- fedora 43: allegro-devel 4.4.3.1-18.fc43 Β· Giftware
- fedora 44: allegro-devel 4.4.3.1-20.fc44 Β· Giftware
- fedora 44: allegro-devel 4.4.3.1-20.fc44 Β· Giftware
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms