al_get_num_display_modes(3alleg5)

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

πŸ’– al_get_num_display_modes πŸ’–

okay so bestie, this is the Allegro 5 API page for al_get_num_display_modes, and it's literally the most "how many vibes are available" function ever. let's get into it πŸ¦‹


✨ SYNOPSIS ✨

#include <allegro5/allegro.h>

int al_get_num_display_modes(void)

no args, no drama, just a number coming back at you 🫢


🌸 DESCRIPTION 🌸

so the way this works is: you ask, and it tells you the number of available fullscreen display modes for whatever display parameters you've currently got set. it's giving headcount energy. πŸ‘‘

and like, it's not just guessing β€” it goes and uses the values you set with al_set_new_display_refresh_rate(3alleg5) and al_set_new_display_flags(3alleg5) to figure out how many modes actually match. so whatever you configured, that's what it's counting against. iykyk ✨

and here's the little cheat code: if you set the new display parameters to zero, you get a list of all the modes for the default driver. no filtering, no gatekeeping, just everything. periodt. πŸ’…

πŸ‘€ SEE ALSO πŸ‘€


and that's the whole page!! this cutie lives in the Allegro reference manual and it's the same name up top and down bottom because symmetry slays πŸ’– go count some modes, you main character, you 🌈⭐

πŸ“¦ where this page comes from