al_merge_config(3alleg5)

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

✨ al_merge_config ✨

okay so bestie, welcome to the Allegro 5 API πŸ’– this one's a little function from the al_merge_config page and honestly? it's giving glow-up for your config files. let's get into it 🫢


🌸 SYNOPSIS 🌸

#include <allegro5/allegro.h>

ALLEGRO_CONFIG *al_merge_config(const ALLEGRO_CONFIG *cfg1,
    const ALLEGRO_CONFIG *cfg2)

like, look at her. two configs in, one config out. no cap πŸ’…


πŸ¦‹ DESCRIPTION πŸ¦‹

so what she does is merge two configuration structures together and hand you back the result as a brand new configuration ✨ like a little config baby, but make it useful.

here's the tea πŸ“ β€” the values in configuration cfg2 override those in cfg1. so if they're beefing over the same key, cfg2 wins, periodt. cfg2 is the main character in that situation, sorry not sorry πŸ‘‘

and the best part? neither of the input configuration structures are modified 🧚 both cfg1 and cfg2 walk away untouched, unbothered, moisturized, in their lane. they don't even know they were merged. iconic behavior fr fr.

πŸ’€ one lil thing though β€” comments from cfg2 are not retained. so if you left a cute lil # note to self in there, she's gone. not invited to the afterparty. sorry bestie 😭

πŸ‘€ SEE ALSO πŸ‘€


and that's the whole vibe check 🌈 this came from the Allegro reference manual, al_merge_config(3alleg5), and yes the version is Allegro 5 in case you were wondering πŸ’œ mwah, go merge some configs responsibly, i'm obsessed with you πŸ«ΆπŸ’–βœ¨

πŸ“¦ where this page comes from