gfx_mode_select(3alleg4)
π gfx_mode_select β the Allegro manual, but make it cute π
okay bestie, gather round, because this is gfx_mode_select(3alleg4) from the Allegro manual and it's literally the vibes-picker for your graphics setup. no cap.
β¨ NAME β¨
gfx_mode_select</p> β pops up the Allegro graphics mode selection dialog. that's it, that's the whole job, and she does it gorgeously. π
πΈ SYNOPSIS πΈ
#include <allegro.h>
int gfx_mode_select(int *card, int *w, int *h);
π¦ DESCRIPTION π¦
So like. This function brings up the Allegro graphics mode selection dialog, which is the lil window where the user gets to pick their screen mode and their graphics card. very main character of them honestly.
Here's the tea tho β the values already sitting at the addresses you pass in via card, w, and h get used as the default selections in the dialog. but only if they actually show up in the driver and mode lists. if they're not in there? then the initial selection just falls back to the first entry in each list. π€·βοΈ
And if you want to guarantee the first entry is always the one preselected, bestie, just initialize the data at the addresses you're passing in to either 0 or -1. iconic behavior. β
Then if the user hits OK on that dialog, it stores the selections at the addresses you passed to the function. cute, right? π
π RETURN VALUE π
ngl, the return values live somewhere else β go check out the gfx_mode_select_filter function for those. i'm not making this up, that's just where they are. π
π SEE ALSO π
gfx_mode_select_ex(3alleg4)gfx_mode_select_filter(3alleg4)set_gfx_mode(3alleg4)gui_fg_color(3alleg4)
fr fr, if you forget the defaults, the dialog just picks the first thing in the list and moves on. set0or-1if you want that on purpose. no surprises, no drama. π«Ά
and that's the whole page, bestie!! π₯³ this was brought to you by Allegro, version 4.4.3 β go forth and select your modes, you absolute legend. mwah πβ¨
π¦ where this page comes from
- debian bookworm: allegro4-doc 2:4.4.3.1-3 Β· Allegro-gift-ware
- debian trixie: allegro4-doc 2:4.4.3.1-5 Β· Allegro-gift-ware
- ubuntu jammy: allegro4-doc 2:4.4.3.1-2 Β· Allegro-gift-ware
- ubuntu noble: allegro4-doc 2:4.4.3.1-4.1build3 Β· Allegro-gift-ware
- ubuntu questing: allegro4-doc 2:4.4.3.1-6
- ubuntu resolute: allegro4-doc 2:4.4.3.1-7 Β· Allegro-gift-ware
- ubuntu stonking: allegro4-doc 2:4.4.3.1-9 Β· Allegro-gift-ware
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms