is_windowed_mode(3alleg4)
β¨ NAME β¨
is_windowed_mode β bestie this one literally just tells you if you're running in windowed mode π (also: it's from the Allegro game programming library, mwah)
πΈ SYNOPSIS πΈ
#include <allegro.h>
int is_windowed_mode(void);
π¦ DESCRIPTION π¦
okay so picture this: you called set_gfx_mode() at some point and now you're likeβ¦ was that a window situation or a full screen takeover situation? π You don't have to guess, babes β this function exists specifically to detect whether or not set_gfx_mode() selected a windowed mode. vibe check complete β
Here's the little example, straight up:
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 it's giving main character energy? two branches, zero chaos. π
π RETURN VALUE π
- returns true if the current graphics mode is a windowed mode πͺ
- returns zero if it's a fullscreen mode π₯οΈ
π¨ okay but fr fr, listen: you should not call this function if you are not in graphics mode. like. don't. it's not a vibe. π
π SEE ALSO π
set_gfx_mode(3alleg4)β the one that got you here in the first place, iconic behavior π
Allegro version 4.4.3 β and that's the whole is_windowed_mode(3alleg4) situation, bestie!! π«Ά tysm for reading, go forth and slay your graphics modes πβ¨πΈπ¦
π¦ 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