Well, i have a fixed window (not resizable) that changes the size 1x,2x and so on...
I tought it would be easy to "detect" when the main window is sized/resized so i found ALLEGRO_EVENT_DISPLAY_RESIZE to do the job, but it seems the "resize" message is not put to the queue.
This is what a i do:
ALLEGRO_DISPLAY* display = al_create_display(320, 240);
And properly "register" display events in my queue.
al_register_event_source(queue, al_get_display_event_source(display));
Then i do a resize like:
al_resize_display(display, 640, 480);
But in the loop where in checks for "messages", after calling al_resize_display() the code never falls here:
if (event.type == ALLEGRO_EVENT_DISPLAY_RESIZE) { //something to do with the new resized window. }
Any Help?
al_resize_display does not trigger an ALLEGRO_EVENT_DISPLAY_RESIZE because you called it yourself so you already know it happened. The resize event happens when a user resizes the window using the drag icons.