RE: [AD] First try to change GFX_SAFE fb behaviour.

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


On Fri, 24 Nov 2000, Vincent Penquerc'h wrote:
> > Can't the behavior you are looking for be emulated by writing
> > `set_color_depth(desktop_color_depth())'? If this is possible, then I
> > think it would give the programmer a bit more control: If his program
> > really requires a specific color depth, then he can force
> > `set_gfx_mode()' to use that; otherwise he can let it pick the desktop's
> > color depth since that is guaranteed to success.
> 
> This assumes desktop_color_depth to return something meaningful and safe
> every time, even in DOS for instance.
> If it is changed to return, say, 8 in DOS, this might be a way to do it.

I've already seen people using desktop_color_depth to 'detect' a graphic
environment; making this function return 8 by default instead of 0 would
break the behaviour.

Besides, the framebuffer is not really a desktop, and you can call
desktop_color_depth before using a driver, which the user may override to
use svgalib instead, making it look awkward.

> But I don't really see the point of forcing a color depth when you ask
> for GFX_SAFE ...

Aha. Thanks for the answers, I was really expecting them and just wanted
to make sure nobody would be against such change :-) I will start
rewritting the fb_init function to work better, make less assumptions,
maybe fix that infinite loop for undocumented fb.modes resolutions, and
think how I could make gfx_mode_select_ex preselect the framebuffer
configuration, which could be used by other drivers too.

At the rate I can code this means some other weeks of delay: you still
have plenty of time to opose to this change :)

PD: The patch I sent was merely for experimenting, it should not be
    applied to cvs (I forgot to tell in my first email)

 Grzegorz Adam Hankiewicz   gradha@xxxxxxxxxx - http://gradha.infierno.org
 Other web pages:  http://glub.ehu.es/  -  http://welcome.to/gogosoftware/



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