Re: [AD] BeOS virtual resolution fix

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


On Thu, Dec 21, 2000 at 06:50:49PM +0100, Angelo Mottola wrote:
> Ok, I've posted a patch to Sourceforge that adds a better virtual resolutions 
> handling for the BeOS fullscreen driver.

I've applied it.

> This patch ensures the virtual height doesn't get bigger than 32767, so it 
> makes the driver to work.

Maybe it would be good if when this limit is reached the screen
expands horizontally instead.  The 32767 limit isn't a problem;
Allegro's drawing functions will start to fail if you use large
coordinates anyway. :)

> Now, I was wondering what's the right behaviour for a gfx driver when you 
> pass 0 to both virtual width and height.

I'm pretty sure it's always been that you can set whatever you
like, but the general behaviour is to round up the width to
something the card is likely to be capable of (this depends on
the card; powers of two are safe, and common screen resolutions
ought to be OK too, but on some cards hardware acceleration is
only available with certain stride widths) and then set the
height as high as it will go.  Which is pretty much what your
code does.

> <snippet>
> 
>    if (set_gfx_mode(gfx_card, gfx_w, gfx_h, (gfx_w >= 512) ? 1024 : 512, 
> (gfx_w >= 512) ? 1024 : 512) != 0) {
>       if (set_gfx_mode(gfx_card, gfx_w, gfx_h, (gfx_w >= 512) ? 1024 : 512, 
> 0) != 0) {
>          if (set_gfx_mode(gfx_card, gfx_w, gfx_h, 0, 0) != 0) {
>  
>             if ((gfx_card == GFX_AUTODETECT) && (gfx_bpp > 8) && (gfx_w == 
> 640) && (gfx_h == 480)) {                                                     
> 
> </snippet>

Weird.  Don't worry about it. :)  Maybe it's so that the
scrolling test doesn't use an insanely large screen.

George

-- 
Random project update:
22/06/2000: AllegroGL alpha 8 released at http://allegrogl.sourceforge.net/
        Improved Windows support.  New directory structure.
        Fixed OpenGL coding mistake in `tex.c'.



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