DIB_DirectDrawSurface_BltFast signed/unsigned comparision bug

Lionel Ulmer lionel.ulmer at free.fr
Mon Jan 26 15:27:12 CST 2004

> I just added explicit casting to int where needed. It didn't fix the mouse 
> trails, but previously missing mouseover effect on icons at the main screen 
> appeared, so I guess it is a change in the right direction :)

While your patch is certainly OK, if 'ddesc.dwWidth-dstx' is lower than
zero, it means that there is nothing to do (as the destination X coordinate
is out of the screen). Same for the source rectangle.

So could you try rewriting your patch with something like that :

if (ddesc.dwWidth<=dstx) return DD_OK;
(and same for Y and srcs).

And check if it gives you the same result as your previous patch. Maybe it's
some added code, but well, it will be a bit cleaner IMHO.

Anyway, thanks for fixing bugs in the DDraw code, we certainly needs more
contributors :-)


		 Lionel Ulmer - http://www.bbrox.org/

More information about the wine-devel mailing list