Commit 851bdfb5 authored by Stefan Dösinger's avatar Stefan Dösinger Committed by Alexandre Julliard

wined3d: Add D3DLOCK_* types to wined3d_types.h.

parent 6fafc229
...@@ -5719,7 +5719,7 @@ HRESULT WINAPI IWineD3DDeviceImpl_CopyRects(IWineD3DDevice *iface, ...@@ -5719,7 +5719,7 @@ HRESULT WINAPI IWineD3DDeviceImpl_CopyRects(IWineD3DDevice *iface,
if (srcWidth == destWidth && srcHeight == destHeight) { if (srcWidth == destWidth && srcHeight == destHeight) {
D3DLOCKED_RECT lrSrc; D3DLOCKED_RECT lrSrc;
D3DLOCKED_RECT lrDst; D3DLOCKED_RECT lrDst;
IWineD3DSurface_LockRect(pSourceSurface, &lrSrc, NULL, D3DLOCK_READONLY); IWineD3DSurface_LockRect(pSourceSurface, &lrSrc, NULL, WINED3DLOCK_READONLY);
IWineD3DSurface_LockRect(pDestinationSurface, &lrDst, NULL, 0L); IWineD3DSurface_LockRect(pDestinationSurface, &lrDst, NULL, 0L);
TRACE("Locked src and dst, Direct copy as surfaces are equal, w=%d, h=%d\n", srcWidth, srcHeight); 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, ...@@ -5759,7 +5759,7 @@ HRESULT WINAPI IWineD3DDeviceImpl_CopyRects(IWineD3DDevice *iface,
copyperline = ((r->right - r->left) * bytesPerPixel); 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.left = p->x;
dest_rect.top = p->y; dest_rect.top = p->y;
dest_rect.right = p->x + (r->right - r->left); dest_rect.right = p->x + (r->right - r->left);
......
...@@ -2150,7 +2150,7 @@ void drawPrimitive(IWineD3DDevice *iface, ...@@ -2150,7 +2150,7 @@ void drawPrimitive(IWineD3DDevice *iface,
if (primCounter >= 0) { if (primCounter >= 0) {
D3DLOCKED_RECT r; D3DLOCKED_RECT r;
char buffer[80]; 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); sprintf(buffer, "/tmp/backbuffer_%ld.tga", primCounter);
TRACE("Saving screenshot %s\n", buffer); TRACE("Saving screenshot %s\n", buffer);
IWineD3DSurface_SaveSnapshot(This->renderTarget, buffer); IWineD3DSurface_SaveSnapshot(This->renderTarget, buffer);
......
...@@ -469,7 +469,7 @@ HRESULT WINAPI IWineD3DSurfaceImpl_LockRect(IWineD3DSurface *iface, D3DLOCKED_RE ...@@ -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_store;
GLint prev_read; GLint prev_read;
...@@ -631,7 +631,7 @@ HRESULT WINAPI IWineD3DSurfaceImpl_LockRect(IWineD3DSurface *iface, D3DLOCKED_RE ...@@ -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); 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 */ /* Don't dirtify */
} else { } else {
IWineD3DBaseTexture *pBaseTexture; IWineD3DBaseTexture *pBaseTexture;
......
...@@ -191,7 +191,7 @@ HRESULT WINAPI IWineD3DVolumeImpl_LockBox(IWineD3DVolume *iface, D3DLOCKED_BOX* ...@@ -191,7 +191,7 @@ HRESULT WINAPI IWineD3DVolumeImpl_LockBox(IWineD3DVolume *iface, D3DLOCKED_BOX*
This->lockedBox.Back = pBox->Back; This->lockedBox.Back = pBox->Back;
} }
if (Flags & (D3DLOCK_NO_DIRTY_UPDATE | D3DLOCK_READONLY)) { if (Flags & (WINED3DLOCK_NO_DIRTY_UPDATE | WINED3DLOCK_READONLY)) {
/* Don't dirtify */ /* Don't dirtify */
} else { } else {
/** /**
......
...@@ -906,4 +906,11 @@ typedef enum _WINED3DDECLUSAGE { ...@@ -906,4 +906,11 @@ typedef enum _WINED3DDECLUSAGE {
#define WINED3DDEVCAPS_RTPATCHHANDLEZERO 0x000800000 #define WINED3DDEVCAPS_RTPATCHHANDLEZERO 0x000800000
#define WINED3DDEVCAPS_NPATCHES 0x001000000 #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 #endif
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment