On Sun 27 Jan 2002 at 12:44:35 +0900, Shyouzou Sugitani wrote:

> Fernand, how do you think about this patch?

> -     xf86_dga_fix_viewport  = 0;
> -     xf86_dga_first_click   = 1;

There is a flaw here, not a big problem though. Look at xinput.c :

        /* Some buggy combination of XFree and virge screwup the viewport
           on the first mouseclick */
        if(xf86_dga_first_click) { xf86_dga_first_click = 0; xf86_dga_fix_viewport = 
1; }

In my patch, I do "xf86_dga_first_click = 0;" instead of removing that
initialization in order to avoid entering in the "if" block. That way,
the code should be more robust to changes.

> -     XDGASetViewport(display,xf86ctx.screen,0,0,XDGAFlipImmediate);
> +     if (xf86ctx.device->mode.viewportFlags & XDGAFlipImmediate)
> +             XDGASetViewport(display,xf86ctx.screen,0,0,XDGAFlipImmediate);
> +     else {
> +             XDGASetViewport(display,xf86ctx.screen,0,0,XDGAFlipRetrace);
> +             while(XDGAGetViewportStatus(display, xf86ctx.screen));
> +     }

Well, I don't see any reason to specify a particular value for the flag,
"0" looks ok to me (and we keep the code simple). I think the following
should be enough :

        XDGASetViewport(display, xf86ctx.screen, 0, 0, 0);
        while (XDGAGetViewportStatus(display, xf86ctx.screen))
                ;

> -     if(xf86_dga_fix_viewport)
> -     {
> -             XF86DGASetViewPort(display,xf86ctx.screen,0,0);
> -             xf86_dga_fix_viewport = 0;
> -     }

Fine.

Fernand

_______________________________________________
Xmame mailing list
[EMAIL PROTECTED]
http://toybox.twisted.org.uk/mailman/listinfo/xmame

Reply via email to