Commit 05fce2cf authored by Marcus Meissner's avatar Marcus Meissner Committed by Alexandre Julliard

Create xlib ddsurfaces with correct reference counts.

parent 42acc339
......@@ -340,7 +340,7 @@ static HRESULT WINAPI Xlib_IDirectDraw2Impl_CreateSurface(
sizeof(IDirectDrawSurfaceImpl)
);
dsurf = (IDirectDrawSurfaceImpl*)*lpdsf;
dsurf->ref = 2;
dsurf->ref = 1;
dsurf->private = HeapAlloc(
GetProcessHeap(),
HEAP_ZERO_MEMORY,
......@@ -403,7 +403,7 @@ static HRESULT WINAPI Xlib_IDirectDraw2Impl_CreateSurface(
IDirectDraw2_AddRef(iface);
back->s.ddraw = This;
back->ref = 2;
back->ref = 1;
ICOM_VTBL(back)=(ICOM_VTABLE(IDirectDrawSurface4)*)&xlib_dds4vt;
/* Copy the surface description from the front buffer */
back->s.surface_desc = dsurf->s.surface_desc;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment