[PATCH] Let BltFast return that the surface is busy when it is locked. The same is done already for Blt.

Roderick Colenbrander thunderbird2k at gmx.net
Fri Feb 15 16:58:38 CST 2008


---
 dlls/wined3d/surface.c |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
index 5803b0a..220875d 100644
--- a/dlls/wined3d/surface.c
+++ b/dlls/wined3d/surface.c
@@ -3466,6 +3466,12 @@ HRESULT WINAPI IWineD3DSurfaceImpl_BltFast(IWineD3DSurface *iface, DWORD dstx, D
     IWineD3DDeviceImpl *myDevice = This->resource.wineD3DDevice;
     TRACE("(%p)->(%d, %d, %p, %p, %08x\n", iface, dstx, dsty, Source, rsrc, trans);
 
+    if ( (This->Flags & SFLAG_LOCKED) || ((srcImpl != NULL) && (srcImpl->Flags & SFLAG_LOCKED)))
+    {
+        WARN(" Surface is busy, returning DDERR_SURFACEBUSY\n");
+        return WINEDDERR_SURFACEBUSY;
+    }
+
     if(myDevice->inScene &&
        (iface == myDevice->stencilBufferTarget ||
        (Source && Source == myDevice->stencilBufferTarget))) {
-- 
1.5.3.8


--========GMX6059120317931183930--



More information about the wine-patches mailing list