Re: [AD] This time GFX_SAFE for real

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


Grzegorz Adam Hankiewicz <gradha@xxxxxxxxxx> wrote:
> 
> Here's a patch for the linux framebuffer. It's essentially the same thing
> I posted previously (but this should get applied ;). The differences are
> that it's a little bit cleaner, and I also patched exhello, grabber and
> the documentation to reflect the GFX_SAFE behaviour and show the purpose
> (it's really nice to get grabber and test work in 1024x768 without
> ordering it explicitly).

Everyone (who understood the patch) seemed to agree, so it's done[1].
I made a few changes, mostly notably, `safe_graphic_mode_change' is
now `_safe_gfx_mode_change', and defined in `graphics.c' instead of
`fbcon.c'.

BTW, you've just maxed out your credit lines in thanks._tx :-)

[1] Seems like Shawn had the same idea once.  From changes._tx:

   3.9.23: changed my mind about how GFX_SAFE should work, and removed the
   color depth emulation bodges. Now, the GFX_SAFE driver may simply change
   the color depth if it doesn't like what you are requesting, and it is up
   to the caller to deal with this.   

> If nobody argues against this change, I will continue to retouch Allegro's
> examples and programs using GFX_SAFE to work on any color depth, because
> most of them make the assumption that 8 bpp will be set.

You'd better hurry, before people complain the CVS version is broken :-)


In another message, it was written:
> > On a side note, shouldn't GFX_SAFE in Windows open a window (GDI mode)?
> > It's safer than switching modes, I agree. At least, we can get a
> > consistant definition of GFX_SAFE!
> 
> That was my suggestion. It would be good if we could agree on a
> "what-does-this-driver-have-to-do" document.

- sets most convenient (read: any) resolution
- sets most convenient (read: any) color depth
- if in a windowing system, use a window

Comments?  My personal opinion is that you shouldn't use GFX_SAFE
except to open a mode selection dialog or something like that
(e.g. setup?).  Everything else should stick to GFX_AUTODETECT.

-- 
tjaden@xxxxxxxxxx - http://www.psynet.net/tjaden/
Even a stopped clock gives the right time twice a day.



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