[AD] [ alleg-Bugs-2444860 ] Display flags mismatch with actual display appearance

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


Bugs item #2444860, was opened at 2008-12-18 05:25
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105665&aid=2444860&group_id=5665

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Core Library
Group: None
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: SiegeLord (siegelord)
Assigned to: Nobody/Anonymous (nobody)
Summary: Display flags mismatch with actual display appearance

Initial Comment:
If you set the new display flags to say ALLEGRO_FULLSCREEN, but pass an impossible resolution, causing the display creation to revert to windowed mode, the flags of the display are not modified accordingly.

E.g.

#include <allegro5/allegro5.h>
#include <stdio.h>

int main()
{
    al_init();
    al_set_new_display_flags(ALLEGRO_FULLSCREEN);
    al_create_display(666, 11);
    printf("Fullscreen: %d", al_get_display_flags() & ALLEGRO_FULLSCREEN);//will print non-0 even though the display is clearly not fullscreen
}

Reason why I want this: I want to alert the user that the display resolution she picked cannot be made fullscreen, so I need to detect whether the display was created as fullscreen or not.

Possible solutions: 

1)Make the display fail to create if the resolution is impossible

2)Update the display flags according to what the display actually is

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105665&aid=2444860&group_id=5665




Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/