In my event handler I respond to ALLEGRO_EVENT_DISPLAY_RESIZE events, but it seems that they don't fire when I call al_toggle_display_flag to toggle fullscreen via ALLEGRO_FULLSCREEN_WINDOW. Seems that that should event should be generated on fs toggle. Is this a bug?
In any case how should I get the current display dimensions on fullscreen toggle?
The way I do it is:
My Display class does this:
So quite simply, I pump my own resize message in this case to the scene manager.
If you want more detail let me know.
But that makes sense, I woudl expect a display resize regardless on an actual change of resolution if toggling between window and fullscreen mode.
Is this not fired by design?
Fullscreen as oppose to windowed mode is a tricky business. My project went on hold for a year due to needing to handle it all properly.
Bah, it's not tricky. See the FAQ.
How do I switch between full-screen and windowed modes?
For full-screen, use ALLEGRO_FULLSCREEN_WINDOWED and scale the buffer with a transformation.[5] For windowed, use ALLEGRO_WINDOWED.