Search code examples
c++callegroallegro5

Allegro get current window size


In Allegro, I can set the Window to be resizeable by running

al_set_new_display_flags(ALLEGRO_RESIZABLE);

before

display = al_create_display(800, 600);

however, if I resize the window, how will I know how big the window is that I resize?


Solution

  • use al_get_window_constraints(ALLEGRO_DISPLAY *display, int *min_w, int *min_h, int *max_w, int *max_h).

    Source