[PATCH 1/5] ddraw: Don't depend on IWineD3DDevice_CreateSurface() not touching the surface parameter on failure.
Henri Verbeet
hverbeet at codeweavers.com
Thu Dec 17 12:14:32 CST 2009
The reason it actually fails is because of ddraw trying to create surface of
type "SURFACE_UNKNOWN". Stefan should have a patch for that.
---
dlls/ddraw/ddraw.c | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/dlls/ddraw/ddraw.c b/dlls/ddraw/ddraw.c
index 46fd729..527f448 100644
--- a/dlls/ddraw/ddraw.c
+++ b/dlls/ddraw/ddraw.c
@@ -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);
--
1.6.4.4
More information about the wine-patches
mailing list