al_resize_display(3alleg5)

πŸ“¦
version 5.2.11.3 Β· 4 versions
, in debian trixie, ubuntu questing, ubuntu resolute, ubuntu stonking

πŸ’– al_resize_display β€” Allegro 5 API πŸ’–

okay bestie, welcome to the al_resize_display(3alleg5) page, aka the one where you get to ✨change how big your window is✨ at runtime. no cap, it's lowkey one of the most useful little functions in the Allegro 5 API. let's get into it 🫢


🌸 SYNOPSIS 🌸

#include <allegro5/allegro.h>

bool al_resize_display(ALLEGRO_DISPLAY *display, int width, int height)

like. that's the whole signature. she's simple, she's iconic, she serves πŸ’…


πŸ¦‹ DESCRIPTION πŸ¦‹

So the vibe here is: you call this and it resizes the display. that's the job. main character energy fr fr.

It returns true on success, or false on error β€” so pls actually check that return value, bestie, don't just ignore her 😭

The tea is that this works on both fullscreen and windowed displays, and it does not care about the ALLEGRO_RESIZABLE flag at all. Like, that flag is simply not invited to this party. it works regardless πŸ‘‘

Also, and this is the part that's easy to miss: it adjusts the clipping rectangle to the full size of the backbuffer. so your clipping rect gets updated for you, no extra steps, you're welcome πŸŽ€


πŸ‘‘ SEE ALSO πŸ‘‘


and that's the page, babes! this was the Allegro reference manual edition of al_resize_display(3alleg5) β€” go resize something, you got this πŸ’œβœ¨πŸ“

πŸ“¦ where this page comes from