Jens Albretsen : ddraw: IDirect3DTextureImpl_Load failed when texture was loading onto itself.

Alexandre Julliard julliard at winehq.org
Wed May 28 14:45:51 CDT 2008


Module: wine
Branch: master
Commit: 46ef2e06fcc4ff34dbae2133202338a777824373
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=46ef2e06fcc4ff34dbae2133202338a777824373

Author: Jens Albretsen <jens at albretsen.dk>
Date:   Thu May 22 15:29:11 2008 +0200

ddraw: IDirect3DTextureImpl_Load failed when texture was loading onto itself.

---

 dlls/ddraw/texture.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/dlls/ddraw/texture.c b/dlls/ddraw/texture.c
index 9a990d4..0f0c278 100644
--- a/dlls/ddraw/texture.c
+++ b/dlls/ddraw/texture.c
@@ -301,6 +301,11 @@ IDirect3DTextureImpl_Load(IDirect3DTexture2 *iface,
     ICOM_THIS_FROM(IDirectDrawSurfaceImpl, IDirect3DTexture2, iface);
     IDirectDrawSurfaceImpl *src_ptr = ICOM_OBJECT(IDirectDrawSurfaceImpl, IDirect3DTexture2, D3DTexture2);
     HRESULT ret_value = D3D_OK;
+    if(src_ptr == This)
+    {
+        TRACE(" copying surface %p to surface %p, why? \n", src_ptr, This);
+        return ret_value;
+    }
 
     TRACE("(%p)->(%p)\n", This, src_ptr);
     EnterCriticalSection(&ddraw_cs);




More information about the wine-cvs mailing list