Re: [AD] GFX_SAFE mode patch

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


On Wed, Oct 02, 2002 at 09:03:03AM +0200, Eric Botcazou wrote:
> I wasn't aware of this 'maintain-screen-resolution' feature, only of the
> 'fixed-screen-depth' requirement. I've attached a revised patch.

I'm still amazed I could introduce this hack into Allegro :-) The patch
works, although it may not be such a good idea to ignore the the user's
configuration.

> I don't really see the problem: the get_gfx_safe_mode method must be set
> only if there is always a safe gfx mode which is known a priori. It's
> clearly not the case under Linux (for some obscure reasons I don't
> understand, it seems it is not possible the query the resolution and color
> depth of the fb console without "initializing" it ? But it is already
> initialized!) so the Linux system driver simply must not set the method.

Didn't explain myself correctly: the linux system driver doesn't know if
the framebuffer can work until you try to set_gfx_mode, _now_. Should the
framebuffer try to detect a resolution in the _module_init function and
return it to the system driver somehow? Maybe get_gfx_safe_mode should
be added to each graphic driver and the system driver should query all
available ones?

> Not every gfx driver is able to report the modes it supports without trying
> to set them first.

Yes, that's the problem.

> > But even then, the new behaviour of set_gfx_mode tries to set the
> > requested resolution before trying the safe mode.
> 
> Huh... are you sure that it's a new behaviour ? The old code even tried to
> set a GFX_AUTODETECTed mode!

Yes, and that's what the _safe_gfx_mode_change hack was for, which you
have taken care of in the new patch.

> > Finally, I see no sense on exposing get_safe_gfx_mode to the user,
> > since he/she will use GFX_SAFE anyway.
> 
> I never intended to do so.

True, this was my short sight.



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