cpu_vendor(3)
β¨ cpu_vendor(3) β¨ β the Allegro manual π
okay bestie, gather round, because this one is a tiny little global variable with main character energy and i am obsessed. it's part of the Allegro game programming library, and it's basically your CPU's little name tag at the function-call party. π
NAME π¦
cpu_vendor β contains the CPU vendor name, fr fr. Allegro game programming library energy. π
SYNOPSIS πΈ
#include <allegro.h>
extern char cpu_vendor[];
like, that's it. that's the whole vibe. two lines and a dream. β¨
DESCRIPTION π
so here's the tea, bestie π«:
- On Intel PCs, this lil variable contains the CPU vendor name if known. (emphasis on if known, she's not gonna make stuff up for you π)
- On Mac OSX systems, this contains the PPC subtype name. iconic platform-specific behaviour, we love to see it. π
- On other platforms, this may be an empty string. not every CPU wants to introduce itself, and that's valid. π
and the important part β the when:
You can read this variable after you have calledcheck_cpu()(which is automatically called byallegro_init()).
so like, don't go reading cpu_vendor before allegro_init() has done its thing, because you'll be reading uninitialised chaos and that is not the vibe check you want. call allegro_init() first, then read away. periodt. π
SEE ALSO π
the whole friend group, obviously:
go read check_cpu(3) next if you wanna know who actually fills this variable in. iykyk. π§
mwah π that's the page! this little cutie comes to you from Allegro, version 4.4.3 β thanks for reading, bestie, now go initialise something. ππβ¨
π¦ where this page comes from
- fedora 43: allegro-devel 4.4.3.1-18.fc43 Β· Giftware
- fedora 43: allegro-devel 4.4.3.1-18.fc43 Β· Giftware
- fedora 44: allegro-devel 4.4.3.1-20.fc44 Β· Giftware
- fedora 44: allegro-devel 4.4.3.1-20.fc44 Β· Giftware
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms