Re: [AD] modernizing the examples

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


On 2007-07-27, Matthew Leverton <meffer@xxxxxxxxxx> wrote:
> On 7/26/07, Peter Wang <novalazy@xxxxxxxxxx> wrote:
> > On 2007-07-26, Matthew Leverton <meffer@xxxxxxxxxx> wrote:
> > > (And if people object to that,
> > > a GFX_DESKTOP magic driver could be made that gives precedence to
> > > windowed drivers.)
> >
> > Good idea.  I'd like for it to be named GFX_AUTODETECT_something,
> > e.g. GFX_AUTODETECT_PREFER_WINDOWED, although it's slightly long.
> >
> >
> 
> Attached is a patch that adds GFX_AUTODETECT_DESKTOP. I'm not married
> to the name, but I'd rather it not get any longer...

GFX_AUTODETECT_DESKTOP doesn't mean anything to me.
We could shorten it by two letters and go with
GFX_AUTODETECT_PREFER_WINDOW :-)

> Backward compatible behavior should remain the same. If
> GFX_AUTODETECT_DESKTOP is selected, then the following occurs:
> 
> 1) Check graphics.gfx_cardw
> 2) Check graphics.gfx_card
> 3) Check windowed drivers
> 4) Check fullscreen drivers
> 
> I think that is a fair method. One might argue that gfx_card should be
> ignored if gfx_cardw is not set, but I think if someone takes the time
> to modify allegro.cfg, then they ought to be responsible for setting
> them both if that's what they want.

Sounds fine.

> Technical details:
...
> C) _set_gfx_mode sets the flags accordingly, and then fills "int
> mode_priority[2]" with the fullscreen / windowed flags in the proper
> order. mode_priority[1] is empty if the user specifically requested
> only one of the two modes.

I can't say I like the mode_priority[2] stuff :-/
Maybe we can commit it and clean it up (_set_gfx_mode needs to be broken
up into some smaller functions).

Peter





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