al_set_new_display_adapter(3alleg5)
π al_set_new_display_adapter β Allegro 5 API π
okay bestie, we're in the Allegro 5 API reference manual and today's main character is al_set_new_display_adapter(3alleg5). she's a little function with big "which screen tho" energy, and honestly? she ate. π¦
β¨ SYNOPSIS β¨
#include <allegro5/allegro.h>
void al_set_new_display_adapter(int adapter)
like, that's it. that's the whole signature. void going in, void coming out, one lil int named adapter in the middle. no cap. π
πΈ DESCRIPTION πΈ
so here's the vibe: this function sets the adapter to use for new displays created by the calling thread. that's the whole job. she's a setter, she's decisive, she knows what she wants and what she wants is for your next display to show up on a specific adapter. π
and girly, quick reminder β the adapter has a monitor attached to it. like they're a package deal, you don't get one without the other. so if you wanna know literally anything about that monitor, you go hit up al_get_num_video_adapters(3alleg5) and al_get_monitor_info(3alleg5). those two are the info desk, this one is the "actually put it there" girlie. π₯
want to go back to how things were before? valid! character development! to return to the default behaviour, just pass ALLEGRO_DEFAULT_DISPLAY_ADAPTER and she'll reset right back to factory settings like nothing ever happened. periodt. β¨
heads up bestie: this only affects new displays created by the calling thread. it's not retroactively redecorating displays you already made. know the difference, it's giving β¨thread-awareβ¨.
π SEE ALSO π
and that's the whole page, no crumbs left. this was pulled straight from the Allegro reference manual (the al_set_new_display_adapter(3alleg5) page, obviously π) β go forth and pick your adapter, you icon. mwah. π«Άππ
π¦ 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