Re: [AD] X11 desktop_color_depth()

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


On November 20, 2001 10:49 pm, you wrote:
> Can someone tell me what's going on here?  It looks very wrong to me,
> at least by the current definition of desktop_color_depth.
>
> /* _xwin_sysdrv_desktop_color_depth:
>  *  Returns the current desktop color depth.
>  */
> static int _xwin_sysdrv_desktop_color_depth(void)
> {
>    if (_xwin.window_depth <= 8)
>       return 8;
>    else if (_xwin.window_depth <= 16)
>       return 16;
>    else
>       return 32;
> }

Well since allegro doesn't support depths < 8bpp that can be 'OK'.
And X will not give a 15bpp or 24bpp depth screen. (from my limited
understanding of X anyway) When asking X it will say 15 is 16 and
24 is 32. (but X also differentiates from bpp (depth) and fbpp (frame buffer 
bits per pixel...)

-- 
Thomas Fjellstrom
tfjellstrom@xxxxxxxxxx
http://strangesoft.net



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