ddraw: Don't depend on IWineD3DDevice_CreateSurface() not touching the surface parameter on failure.

The reason it actually fails is because of ddraw trying to create surface of
type "SURFACE_UNKNOWN". Stefan should have a patch for that.
This commit is contained in:
Henri Verbeet 2009-12-17 19:14:32 +01:00 committed by Alexandre Julliard
parent 41b3b8e4eb
commit aa305c4a24
1 changed files with 4 additions and 2 deletions

View File

@ -1655,9 +1655,11 @@ IDirectDrawImpl_RecreateSurfacesCallback(IDirectDrawSurface7 *surf,
TRUE /* Lockable */, FALSE /* Discard */, surfImpl->mipmap_level, &surfImpl->WineD3DSurface, Usage, Pool,
MultiSampleType, MultiSampleQuality, This->ImplType, Parent, &ddraw_null_wined3d_parent_ops);
IUnknown_Release(Parent);
if(hr != D3D_OK)
if (FAILED(hr))
{
surfImpl->WineD3DSurface = wineD3DSurface;
return hr;
}
IWineD3DSurface_SetClipper(surfImpl->WineD3DSurface, clipper);