gfx_mode_select_ex(3)

πŸ“¦ version 4.4.3.1, in fedora 43, fedora 44

✨ NAME ✨

gfx_mode_select_ex β€” the extended glow-up version of the graphics mode selection dialog, bestie πŸ’… this one's from the Allegro game programming library.


πŸŽ€ SYNOPSIS πŸŽ€

#include <allegro.h>

int gfx_mode_select_ex(int *card, int *w, int *h, int *color_depth);

πŸ¦‹ DESCRIPTION πŸ¦‹

Okay so this is the extended version of the graphics mode selection dialog, and the extra slay here is that it also lets the user pick the color depth. Main character feature, honestly. πŸ‘‘

Same rules as gfx_mode_select, okay? The values sitting at the addresses you pass in get used as suggestions for the initial selections in the dialog. And if those values aren't found in the list? It just defaults to the first entry in each list. No drama, no crash, just vibes.

So if you want to guarantee that each list starts on the very first entry, initialize the data at those addresses to either 0 or -1. That's the trick. πŸ“

And then β€” if the user hits OK on the dialog β€” it stores the selections right back at the addresses you passed in. Round trip complete. 🫢


🌈 RETURN VALUE 🌈

Not gonna lie, the return values live over in the gfx_mode_select_filter function. Go check that one, bestie β€” that's where the deets are. πŸ’œ


πŸ‘‘ SEE ALSO πŸ‘‘


Allegro, version 4.4.3 β€” that's the era we're living in, bestie, and this page is iconic, periodt. Go pop a dialog and pick your color depth like the queen you are. πŸ’–βœ¨πŸŽ€πŸ¦‹

πŸ“¦ where this page comes from