diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c index 409d5cb4cc1..b621ffdca61 100644 --- a/dlls/wined3d/device.c +++ b/dlls/wined3d/device.c @@ -5719,7 +5719,7 @@ HRESULT WINAPI IWineD3DDeviceImpl_CopyRects(IWineD3DDevice *iface, if (srcWidth == destWidth && srcHeight == destHeight) { D3DLOCKED_RECT lrSrc; D3DLOCKED_RECT lrDst; - IWineD3DSurface_LockRect(pSourceSurface, &lrSrc, NULL, D3DLOCK_READONLY); + IWineD3DSurface_LockRect(pSourceSurface, &lrSrc, NULL, WINED3DLOCK_READONLY); IWineD3DSurface_LockRect(pDestinationSurface, &lrDst, NULL, 0L); TRACE("Locked src and dst, Direct copy as surfaces are equal, w=%d, h=%d\n", srcWidth, srcHeight); @@ -5759,7 +5759,7 @@ HRESULT WINAPI IWineD3DDeviceImpl_CopyRects(IWineD3DDevice *iface, copyperline = ((r->right - r->left) * bytesPerPixel); } - IWineD3DSurface_LockRect(pSourceSurface, &lrSrc, r, D3DLOCK_READONLY); + IWineD3DSurface_LockRect(pSourceSurface, &lrSrc, r, WINED3DLOCK_READONLY); dest_rect.left = p->x; dest_rect.top = p->y; dest_rect.right = p->x + (r->right - r->left); diff --git a/dlls/wined3d/drawprim.c b/dlls/wined3d/drawprim.c index bf5bc54bc8e..37d74537b4e 100644 --- a/dlls/wined3d/drawprim.c +++ b/dlls/wined3d/drawprim.c @@ -2150,7 +2150,7 @@ void drawPrimitive(IWineD3DDevice *iface, if (primCounter >= 0) { D3DLOCKED_RECT r; char buffer[80]; - IWineD3DSurface_LockRect(This->renderTarget, &r, NULL, D3DLOCK_READONLY); + IWineD3DSurface_LockRect(This->renderTarget, &r, NULL, WINED3DLOCK_READONLY); sprintf(buffer, "/tmp/backbuffer_%ld.tga", primCounter); TRACE("Saving screenshot %s\n", buffer); IWineD3DSurface_SaveSnapshot(This->renderTarget, buffer); diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c index cb1ab997cb4..02d8a7eb42e 100644 --- a/dlls/wined3d/surface.c +++ b/dlls/wined3d/surface.c @@ -469,7 +469,7 @@ HRESULT WINAPI IWineD3DSurfaceImpl_LockRect(IWineD3DSurface *iface, D3DLOCKED_RE } } - } else if (WINED3DUSAGE_RENDERTARGET & This->resource.usage && !(Flags&D3DLOCK_DISCARD)) { /* render surfaces */ + } else if (WINED3DUSAGE_RENDERTARGET & This->resource.usage && !(Flags&WINED3DLOCK_DISCARD)) { /* render surfaces */ GLint prev_store; GLint prev_read; @@ -631,7 +631,7 @@ HRESULT WINAPI IWineD3DSurfaceImpl_LockRect(IWineD3DSurface *iface, D3DLOCKED_RE FIXME("unsupported locking to surface surf@%p usage(%lu)\n", This, This->resource.usage); } - if (Flags & (D3DLOCK_NO_DIRTY_UPDATE | D3DLOCK_READONLY)) { + if (Flags & (WINED3DLOCK_NO_DIRTY_UPDATE | WINED3DLOCK_READONLY)) { /* Don't dirtify */ } else { IWineD3DBaseTexture *pBaseTexture; diff --git a/dlls/wined3d/volume.c b/dlls/wined3d/volume.c index 151ade3a89d..d253e3c10a2 100644 --- a/dlls/wined3d/volume.c +++ b/dlls/wined3d/volume.c @@ -191,7 +191,7 @@ HRESULT WINAPI IWineD3DVolumeImpl_LockBox(IWineD3DVolume *iface, D3DLOCKED_BOX* This->lockedBox.Back = pBox->Back; } - if (Flags & (D3DLOCK_NO_DIRTY_UPDATE | D3DLOCK_READONLY)) { + if (Flags & (WINED3DLOCK_NO_DIRTY_UPDATE | WINED3DLOCK_READONLY)) { /* Don't dirtify */ } else { /** diff --git a/include/wine/wined3d_types.h b/include/wine/wined3d_types.h index 75a9ee118f4..fc5ba179fb5 100644 --- a/include/wine/wined3d_types.h +++ b/include/wine/wined3d_types.h @@ -906,4 +906,11 @@ typedef enum _WINED3DDECLUSAGE { #define WINED3DDEVCAPS_RTPATCHHANDLEZERO 0x000800000 #define WINED3DDEVCAPS_NPATCHES 0x001000000 +#define WINED3DLOCK_READONLY 0x0010 +#define WINED3DLOCK_NOSYSLOCK 0x0800 +#define WINED3DLOCK_NOOVERWRITE 0x1000 +#define WINED3DLOCK_DISCARD 0x2000 +#define WINED3DLOCK_DONOTWAIT 0x4000 +#define WINED3DLOCK_NO_DIRTY_UPDATE 0x8000 + #endif