os_version(3alleg4)
π os_version, os_revision π
okay bestie, so this is the Allegro game programming library manual page for os_version and os_revision β literally the two little ints that tell you which Operating System you're vibing on rn. it's from the Allegro manual, section 3, and it's about to be your new fave π¦
β¨ SYNOPSIS β¨
like, the whole vibe in code form:
#include <allegro.h>
extern int os_version;
extern int os_revision;
yes bestie, just two extern ints. that's it. that's the whole API. no cap.
πΈ DESCRIPTION πΈ
so os_version and os_revision hold the major and minor version of the Operating System that's currently running. iconic behavior tbh π
they get set for you by allegro_init(), so you don't have to lift a finger β Allegro does it automatically the moment you call it. main character energy fr fr π
ngl, sometimes it just doesn't work out. if Allegro for some reason was not able to retrieve the version of the Operating System, thenos_versionandos_revisionwill both be set to-1. so if you see a-1in there, that's the "bestie I tried but I couldn't" flag π
okay for example β and this is literally the example from the original, so stay with me: under Win98 SE (v4.10.2222), os_version will be set to 4 and os_revision to 10. see how it just grabs the first two numbers? the 2222 is doing its own thing, we don't talk about her π
π SEE ALSO π
go read these next, they're literally the sibling pages:
and that's the whole page, bestie!! πβ¨ you understood it, you slayed it, periodt π
this was brought to you by <strong>Allegro, version 4.4.3</strong> β she's an icon, she's a legend, and she is the moment π
π¦ where this page comes from
- debian bookworm: allegro4-doc 2:4.4.3.1-3 Β· Allegro-gift-ware
- debian trixie: allegro4-doc 2:4.4.3.1-5 Β· Allegro-gift-ware
- ubuntu jammy: allegro4-doc 2:4.4.3.1-2 Β· Allegro-gift-ware
- ubuntu noble: allegro4-doc 2:4.4.3.1-4.1build3 Β· Allegro-gift-ware
- ubuntu questing: allegro4-doc 2:4.4.3.1-6
- ubuntu resolute: allegro4-doc 2:4.4.3.1-7 Β· Allegro-gift-ware
- ubuntu stonking: allegro4-doc 2:4.4.3.1-9 Β· Allegro-gift-ware
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms