ddraw: IDirect3DTextureImpl_Load failed when texture was loading onto itself.

This commit is contained in:
Jens Albretsen 2008-05-22 15:29:11 +02:00 committed by Alexandre Julliard
parent 751b55f4e9
commit 46ef2e06fc
1 changed files with 5 additions and 0 deletions

View File

@ -301,6 +301,11 @@ IDirect3DTextureImpl_Load(IDirect3DTexture2 *iface,
ICOM_THIS_FROM(IDirectDrawSurfaceImpl, IDirect3DTexture2, iface); ICOM_THIS_FROM(IDirectDrawSurfaceImpl, IDirect3DTexture2, iface);
IDirectDrawSurfaceImpl *src_ptr = ICOM_OBJECT(IDirectDrawSurfaceImpl, IDirect3DTexture2, D3DTexture2); IDirectDrawSurfaceImpl *src_ptr = ICOM_OBJECT(IDirectDrawSurfaceImpl, IDirect3DTexture2, D3DTexture2);
HRESULT ret_value = D3D_OK; 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); TRACE("(%p)->(%p)\n", This, src_ptr);
EnterCriticalSection(&ddraw_cs); EnterCriticalSection(&ddraw_cs);