al_set_new_display_adapter(3alleg5)

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

πŸ’– 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