![]() |
|
Display (fullscreen window) and window dimensions |
Bluebird
Member #15,421
December 2013
|
Ok, so somewhere between a previous version of A5 and the current (5.2.8.0), something changed in regard to display dimensions immediately after creating a display. Previously, I could create a display with ALLEGRO_FULLSCREEN_WINDOW, then do al_create_display(800, 600), and the dimensions DIRECTLY after display creation would be the dimensions of my desktop. I could then cache these dimensions and update them only when receiving a ALLEGRO_EVENT_DISPLAY_RESIZE, thus avoiding having to constantly poll with al_get_display_width, etc. However, now when I create my display, the display immediately fills the desktop monitor, but calling al_get_display_width immediately after creating the display returns 800! And I never get a ALLEGRO_EVENT_DISPLAY_RESIZE to represent the fact that the window changed size to fill the screen. Should I just give up trying to cache the display dimensions and poll al_get_display_width, etc. on every frame? |
Edgar Reynaldo
Major Reynaldo
May 2007
![]() |
Well that sucks. I think the old behavior was better. Try caching both fullscreen and windowed sizes and track whether or not you're in fullscreen window mode. My Website! | EAGLE GUI Library Demos | My Deviant Art Gallery | Spiraloid Preview | A4 FontMaker | Skyline! (Missile Defense) Eagle and Allegro 5 binaries | Older Allegro 4 and 5 binaries | Allegro 5 compile guide |
Bluebird
Member #15,421
December 2013
|
It's not that I particularly need to know whether I'm fullscreen or not, it's just that I don't get an ALLEGRO_EVENT_DISPLAY_RESIZE to signal the switch. Anyway I'm polling at the beginning of every frame now, in addition to handling ALLEGRO_EVENT_DISPLAY_RESIZE, and everything works now. For reference I also posted at https://github.com/liballeg/allegro5/issues/1500. I had also added more info there in a followup. |
|