(removing Paul from CC)
I think the problem is that we lock both the src and dest surfaces, without checking to see if they are the same. I think we then try to lock both surfaces and one of the locks fails.
Perhaps this might be a better solution:
if (src == iface) { DD_STRUCT_INIT(&ddesc); DD_STRUCT_INIT(&sdesc);
IDirectDrawSurface7_Lock(iface,NULL,&ddesc,0,0);
DD_STRUCT_COPY_BYSIZE(&ddesc,&sdesc); } else { DD_STRUCT_INIT(&ddesc); DD_STRUCT_INIT(&sdesc);
sdesc.dwSize = sizeof(sdesc); if (src) IDirectDrawSurface7_Lock(src, NULL, &sdesc, DDLOCK_READONLY, 0); ddesc.dwSize = sizeof(ddesc); IDirectDrawSurface7_Lock(iface,NULL,&ddesc,DDLOCK_WRITEONLY,0); }
I don't have access to my box with my Wine tree right now so I don't know if this will compile. Note that the fix will need to be done for both _Blt() and _BltFast().
Paul Vriens wrote:
On Tue, 2005-03-15 at 07:35, Tony Lambregts wrote:
After working prefectly for over 2 years SimCity 3000 is broken.
The patch that broke it is http://www.winehq.org/hypermail/wine-cvs/2005/03/0098.html
basicly the problem is simple. The source and the destination are both the same surface in DIB_DirectDrawSurface_Blt() and with the new locking in place the destination never gets updated. So althought it might fix Picasa2 it is definatly not correct.
--
Tony Lambregts
Hi Tony,
I don't know why I'm cc-ed. I only fixed another regression ;-). I don't known anything about locking, so Matt?
Cheers,
Paul.