[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 11:25
Message generated for change (Comment added) made by eglebbk
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: 4.9
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

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

>Comment By: Evert Glebbeek (eglebbk)
Date: 2008-12-18 13:15

Message:
Is this on X11?
On X11, ALLEGRO_FULLSCREEN is treated as a hint rather than a requirement,
so it happily sets a windowed mode. This is a known bug (well, known since
I found it last week or so), but well done posting it here. The correct fix
is to have al_create_display() fail if a fullscreen mode is requested but
it cannot be set.

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

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/