Re: [AD] fbcon driver color depth

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


On Sunday 07 January 2007 12:04, Peter Wang wrote:
> > +#if (defined ALLEGRO_LINUX_FBCON) && (!defined ALLEGRO_WITH_MODULES)
> > +/* Functions for querying the framebuffer, for the fbcon driver */
> > +extern int __al_linux_get_fb_color_depth(void);
> > +extern int __al_linux_get_fb_resolution(int *width, int *height);
> > +#endif
> 
> Please move this into one of the internal headers, and make sure it's
> included by fbcon.c

I'll move it to the end of allegro/platform/aintlnx.h; there's already an 
#ifdef ALLEGRO_LINUX_VGA there anyway. I had a reason for not wanting to 
put it there last night, but I forgot so it can't have been that 
important.

> Is it necessary to avoid reading the mode twice?  (I didn't check the 
code.)

No, but the code does a bit more than just read the mode and since I can't 
check for side-effect myself I figured it was best to try to prevent there 
being any by running the initialisation code twice.
You may also think of it as an optimisaton not unnescessarily doing work 
twice. ;)

> > -   if (fb_open_device() != 0)
> > +   if ( (!fb_mode_read) && (fb_open_device() != 0) )
> >        return NULL;
> 
> Please stick to the formatting of the file you're editing.  Thanks.

I'm not entirely sure what you're refering to here, since the change in 
question isn't a formatting change. Do you mean the extra spaces for the 
outer parentheses? Or do youwant me to remove the redundant inner 
parentheses?

Evert




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