al_get_display_mode(3alleg5)

πŸ“¦
version 5.2.11.3 Β· 4 versions
, in debian trixie, ubuntu questing, ubuntu resolute, ubuntu stonking

✨ NAME ✨

al_get_display_mode β€” it's giving Allegro 5 API energy, bestie πŸ’–


🌸 SYNOPSIS 🌸

#include <allegro5/allegro.h>

ALLEGRO_DISPLAY_MODE *al_get_display_mode(int index, ALLEGRO_DISPLAY_MODE *mode)

πŸŽ€ DESCRIPTION πŸŽ€

okay so. this one snatches you a fullscreen mode, fr fr. πŸ–₯️✨

here's the tea tho β€” do NOT be out here changing your display parameters between calling al_get_num_display_modes(3alleg5) and al_get_display_mode(3alleg5). like, the two of them are a package deal, a duo, main character energy together. mess with the display in between and the whole vibe check fails. πŸ’€

and index? it's gotta be between 0 and the number returned from al_get_num_display_modes minus 1. so like, 0 through al_get_num_display_modes - 1, no cap. no out-of-bounds shenanigans, we don't do that here. πŸ™ˆ

mode has to be an allocated ALLEGRO_DISPLAY_MODE structure β€” like, actually allocated, bestie, not just a vibe. 🫢

what does it give back?

  • on failure β†’ it returns NULL 😭
  • on success β†’ it returns the mode parameter you passed in, all glowed up and ready πŸ’…

πŸ¦‹ SEE ALSO πŸ¦‹


and that's the whole page, icon, you ate that πŸ“βœ¨ this lil' legend lives in the Allegro reference manual, and yeah, the page is literally called al_get_display_mode(3alleg5) β€” same name top and bottom, symmetrical queen πŸ‘‘πŸ’œ

πŸ“¦ where this page comes from