al_set_display_option(3alleg5)

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

✨ NAME ✨

al_set_display_option β€” Allegro 5 API πŸ’–

okay bestie, you're in the 3alleg5 manual, and this is the function that lets you tweak a display you already made. let's get into it πŸ¦‹


✨ SYNOPSIS ✨

#include <allegro5/allegro.h>

void al_set_display_option(ALLEGRO_DISPLAY *display, int option, int value)

✨ DESCRIPTION ✨

so here's the tea πŸ“ β€” this function changes an option that was previously set for a display. that's the whole vibe.

when displays get created, they take on whatever options were set with al_set_new_display_option(3alleg5). but here's the catch, and it's kind of important: if you call al_set_new_display_option(3alleg5) after that, it only changes options for newly created displays. it does not touch the options of displays that already exist. they're already out here living their lives, not taking notes πŸ“.

that's exactly where al_set_display_option(3alleg5) comes in β€” it lets you change some of those values on a display that's already up and running.

but listen. πŸ‘‘ not all display options can be changed, and sometimes changing them will have no effect at all. and changing options other than the ones listed below is undefined. not "probably fine", not "yolo", just undefined. so stay in your lane, gorgeous πŸ’….

  • ALLEGRO_SUPPORTED_ORIENTATIONS β€” you can change this to allow new orientations of the screen/device, or to restrict ones that were previously enabled. for the full scoop on this option, go check al_set_new_display_option(3alleg5). 🌈

✨ SINCE ✨

5.1.5 β€” she's been around a minute, periodt πŸ’œ


✨ SEE ALSO ✨


and that's the whole page, bestie πŸŽ€ this was the Allegro reference manual, al_set_display_option(3alleg5), brought to you by the Allegro reference manual itself β€” go set some options, but only the supported ones, no cap πŸ«ΆπŸ’–

πŸ“¦ where this page comes from