Stefan Dösinger : wined3d: Refuse to lock locked surfaces.
Alexandre Julliard
julliard at wine.codeweavers.com
Thu Aug 23 07:26:02 CDT 2007
Module: wine
Branch: master
Commit: ea283d3cba942393c6c2d8864a6e02257f39327c
URL: http://source.winehq.org/git/wine.git/?a=commit;h=ea283d3cba942393c6c2d8864a6e02257f39327c
Author: Stefan Dösinger <stefan at codeweavers.com>
Date: Tue Aug 14 14:40:04 2007 +0200
wined3d: Refuse to lock locked surfaces.
---
dlls/wined3d/surface.c | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
index 20ade5c..7e525c5 100644
--- a/dlls/wined3d/surface.c
+++ b/dlls/wined3d/surface.c
@@ -673,6 +673,10 @@ static HRESULT WINAPI IWineD3DSurfaceImpl_LockRect(IWineD3DSurface *iface, WINED
TRACE("(%p) : rect@%p flags(%08x), output lockedRect@%p, memory@%p\n", This, pRect, Flags, pLockedRect, This->resource.allocatedMemory);
+ if (This->Flags & SFLAG_LOCKED) {
+ WARN("Surface is already locked, returning D3DERR_INVALIDCALL\n");
+ return WINED3DERR_INVALIDCALL;
+ }
if (!(This->Flags & SFLAG_LOCKABLE)) {
/* Note: UpdateTextures calls CopyRects which calls this routine to populate the
texture regions, and since the destination is an unlockable region we need
More information about the wine-cvs
mailing list