[SDL] [PATCH] DGA driver buggy and slow
Sami Näätänen
sami.naatanen at kolumbus.fi
Fri Nov 1 08:02:00 PST 2002
On Friday 01 November 2002 11:44, Glenn Maynard wrote:
> On Fri, Nov 01, 2002 at 10:13:15AM +0100, Cezary Kaliszyk wrote:
> > - XFlush(DGA_Display);
> > + if (!this->screen->flags & SDL_DOUBLEBUF) XFlush(DGA_Display);
> > DGA_AddBusySurface(dst);
> > UNLOCK_DISPLAY();
> > return(0);
> > @@ -856,7 +856,7 @@
> > SDL_NAME(XDGACopyArea)(DGA_Display, DGA_Screen,
> > srcx, srcy, w, h, dstx, dsty);
> > }
> > - XFlush(DGA_Display);
> > + if (!this->screen->flags & SDL_DOUBLEBUF) XFlush(DGA_Display);
>
> You probably mean
>
> if (!(this->screen->flags & SDL_DOUBLEBUF)) XFlush(DGA_Display);
>
> ! has higher precedence than &.
In fact in this case it doesn't mater. Although the later is much
clearer way of presenting the test.
Explanation:
Inverse of the flags will reverse the result of the 'and' and thus do
exactly the same thing as the other alternative.
More information about the SDL
mailing list