Re: [AD] al_toggle_display_flag

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


On 11 Feb 2010, at 15:24 , Elias Pschernig wrote:
> No. I made it so the function returns false if the vtable entry is NULL,
> so it still works as expected. Toggling the frame isn't a very important
> feature anyway (only use-case I can think of is the settings screen of a
> music player).

Implemented now on OS X, where I've also implemented the RESIZABLE flag (untested).
It's a bit unstable though, the application doesn't seem to behave properly when the frame is toggled (it becomes unresponsive and I get error messages on terminal).
It seems best to simply set the flag when the window is created and leave it at that.

By the way - I just realised that "al_toggle_display_flag" is a misnomer, since you're not toggling the flag but setting it to a well-defined value.

> Toggling an existing display between fullscreen and windowed will be a
> much more often used feature though, it's what I want to look at next.

Do you mean in general, or a fake fullscreen mode that covers the display area?
Toggling to a fullscreen mode is (again) not trivial, certainly not on OS X. Resizing the window to cover the entire screen at the desktop resolution is easy (at least on 10.5+, it may be impossible on older versions without actually creating a new window) but the reverse is not.
Anyway, since that's basically a resize operation, I would prefer it to be handled as a resize operation, not a display flag.

Evert



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