ddraw correctness fixes patch

Christian Costa titan.costa at wanadoo.fr
Fri Mar 18 06:34:00 CST 2005


> Message du 18/03/05 06:44
> De : "Tom Wickline" 
> A : "wine-devel" 
> Copie à : 
> Objet : ddraw correctness fixes patch
> 
> anyone know why this patch hasn't been accepted?
> 
> http://www.winehq.org/hypermail/wine-patches/2005/03/0328.html
> 
> Tom
> 

Hi Tom,

Sorry I missed the patch on wine-patches but I do remember an old version sent to wine-devel.

So let's review it. :-)

The new locking mechanism is wrong. 
DDLOCK_xxx are just used for optimization.

The thing to do during the blit should be something like that :

     sdesc.dwSize = sizeof(sdesc);
     ddesc.dwSize = sizeof(ddesc);
     if (src == NULL)
        IDirectDrawSurface7_Lock(iface, &lock_dst, &ddesc, DDLOCK_WRITEONLY, 0);
     else if (src == iface) {
       RECT lock_union = < rect that just contains lock_dst and lock_src >; 
       IDirectDrawSurface7_Lock(iface, &lock_union, &ddesc, 0, 0);
      sdesc = ddesc;
     } else {
       IDirectDrawSurface7_Lock(src, &lock_src, &sdesc, DDLOCK_READONLY, 0);
       IDirectDrawSurface7_Lock(iface, &lock_dst, &ddesc, DDLOCK_WRITEONLY, 0);
    }

and the previous locking code should be used.

The added DD_STRUCT_INIT are useless.

Hope that helps.

Bye,
Christian






More information about the wine-devel mailing list