al_set_display_flag(3alleg5)

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

πŸ’… al_set_display_flag β€” Allegro 5 API

okay bestie, so this one lives in the Allegro 5 manual (that's the 3alleg5 situation, iykyk) and it's literally the glow-up button for your display flags ✨


✨ SYNOPSIS ✨

#include <allegro5/allegro.h>

bool al_set_display_flag(ALLEGRO_DISPLAY *display, int flag, bool onoff)

🌸 DESCRIPTION 🌸

So basically you pass in a display, a flag, and an onoff β€” and this function toggles that one display flag on or off. That's it, that's the whole vibe πŸŽ€

The flags are the exact same crew as the ones for al_set_new_display_flags(3alleg5). BUT β€” and this is the part you have to hear me on β€” the only flags you can switch up after the display already exists are these three queens:

  • ALLEGRO_FULLSCREEN_WINDOW
  • ALLEGRO_FRAMELESS
  • ALLEGRO_MAXIMIZED

That's the whole list. No extras, no secret menu, periodt πŸ’…

It returns true if the driver actually supports toggling the flag you asked for, and false if it doesn't (rip 🫢). And here's the sneaky part β€” a true doesn't mean the property actually changed. To check that, go ask al_get_display_flags(3alleg5) and see what really happened. It's giving "trust but verify" fr fr πŸ‘‘


⭐ SINCE ⭐

5.0.7, 5.1.2


πŸ¦‹ SEE ALSO πŸ¦‹


k that's the whole page bestie, no cap πŸ’– this came straight out of the Allegro reference manual, and yes the header up top is literally al_set_display_flag(3alleg5) β€” iconic of it. go toggle something, ily, bye πŸŒˆπŸŽ€

πŸ“¦ where this page comes from