al_set_display_option(3alleg5)
β¨ 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 checkal_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
- debian trixie: allegro5-doc 2:5.2.10.1+dfsg-1 Β· Zlib
- ubuntu questing: allegro5-doc 2:5.2.10.1+dfsg-1build1
- ubuntu resolute: allegro5-doc 2:5.2.11.3+dfsg-1 Β· Zlib
- ubuntu stonking: allegro5-doc 2:5.2.11.3+dfsg-1 Β· Zlib
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms