DOKK / manpages / debian 12 / allegro4-doc / SCREEN_W.3alleg4.en
SCREEN_W(3alleg4) Allegro manual SCREEN_W(3alleg4)

SCREEN_W, SCREEN_H - Global define to obtain the size of the screen. Allegro game programming library.

#include <allegro.h>

#define SCREEN_W;

#define SCREEN_H;

Global defines that return the width and height of the screen, or zero if the screen has not been initialised yet. Example:


char buf[100];
...
uszprintf(buf, sizeof(buf),
"The screen size is %d x %d pixels",
SCREEN_W, SCREEN_H);

screen(3alleg4), set_gfx_mode(3alleg4), VIRTUAL_W(3alleg4), VIRTUAL_H(3alleg4)

version 4.4.3 Allegro