is_windowed_mode(3)
π is_windowed_mode π
okay bestie, so this is a page from the Allegro manual (the game programming library, yes THAT one, she's iconic) and we're talking about is_windowed_mode β the little function that tells you if you're running in windowed mode πͺβ¨
πΈ NAME πΈ
is_windowed_mode β tells you if you are running in windowed mode. Part of the Allegro game programming library π
π¦ SYNOPSIS π¦
#include <allegro.h>
int is_windowed_mode(void);
no cap, that's the whole vibe π
β¨ DESCRIPTION β¨
so like, this function is your girl for detecting whether or not set_gfx_mode() selected a windowed mode π«Ά it's literally just a lil vibe check on your graphics mode.
here's the moment, the example, the main character scene:
if (set_gfx_mode(GFX_AUTODETECT, 640, 480, 0, 0) != 0)
abort_on_error("Couldn't set graphic mode!");
if (is_windowed_mode()) {
/* Windowed mode stuff. */
} else {
/* Fullscreen mode stuff. */
}
see how she's branching? windowed mode stuff in one lane, fullscreen mode stuff in the other π you get to decide what goes where, the function just tells you which reality you're in π
π RETURN VALUE π
- returns true if the current graphics mode is a windowed mode πͺ
- returns zero if it is a fullscreen mode π₯οΈ
π¨ okay important bestie: you should not call this function if you are not in graphics mode. like, don't. she needs a graphics mode to vibe with, fr fr. no graphics mode, no answer π
π₯ SEE ALSO π₯
that's the whole page, periodt π go forth and check your windows responsibly, you absolute legend π
~ from the Allegro manual, version 4.4.3 β mwah, love u, bye ππ
π¦ 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