Commit 867c436a authored by Marcus Meissner's avatar Marcus Meissner Committed by Alexandre Julliard

Merged _all_ lpClipper into common_surface.

Add NULL ptr check to SetClipper. Some more debug output.
parent 2d7be870
...@@ -1561,7 +1561,7 @@ static ULONG WINAPI Xlib_IDirectDrawSurface4Impl_Release(LPDIRECTDRAWSURFACE4 if ...@@ -1561,7 +1561,7 @@ static ULONG WINAPI Xlib_IDirectDrawSurface4Impl_Release(LPDIRECTDRAWSURFACE4 if
/* Free the clipper if present */ /* Free the clipper if present */
if( This->s.lpClipper ) if( This->s.lpClipper )
IDirectDrawClipper_Release(This->lpClipper); IDirectDrawClipper_Release(This->s.lpClipper);
HeapFree(GetProcessHeap(),0,This); HeapFree(GetProcessHeap(),0,This);
return S_OK; return S_OK;
...@@ -1645,9 +1645,9 @@ static HRESULT WINAPI IDirectDrawSurface4Impl_SetClipper( ...@@ -1645,9 +1645,9 @@ static HRESULT WINAPI IDirectDrawSurface4Impl_SetClipper(
ICOM_THIS(IDirectDrawSurface4Impl,iface); ICOM_THIS(IDirectDrawSurface4Impl,iface);
TRACE("(%p)->(%p)!\n",This,lpClipper); TRACE("(%p)->(%p)!\n",This,lpClipper);
IDirectDrawClipper_Release( This->s.lpClipper ); if (This->s.lpClipper) IDirectDrawClipper_Release( This->s.lpClipper );
This->s.lpClipper = lpClipper; This->s.lpClipper = lpClipper;
IDirectDrawClipper_AddRef( lpClipper ); /* Add the reference to it */ if (lpClipper) IDirectDrawClipper_AddRef( lpClipper );
return DD_OK; return DD_OK;
} }
...@@ -3041,15 +3041,17 @@ static HRESULT common_off_screen_CreateSurface(IDirectDraw2Impl* This, ...@@ -3041,15 +3041,17 @@ static HRESULT common_off_screen_CreateSurface(IDirectDraw2Impl* This,
/* No pixel format => use DirectDraw's format */ /* No pixel format => use DirectDraw's format */
lpdsf->s.surface_desc.ddpfPixelFormat = This->d.directdraw_pixelformat; lpdsf->s.surface_desc.ddpfPixelFormat = This->d.directdraw_pixelformat;
lpdsf->s.surface_desc.dwFlags |= DDSD_PIXELFORMAT; lpdsf->s.surface_desc.dwFlags |= DDSD_PIXELFORMAT;
} }
bpp = GET_BPP(lpdsf->s.surface_desc); bpp = GET_BPP(lpdsf->s.surface_desc);
} }
if (lpdsf->s.surface_desc.dwFlags & DDSD_LPSURFACE) { if (lpdsf->s.surface_desc.dwFlags & DDSD_LPSURFACE) {
/* The surface was preallocated : seems that we have nothing to do :-) */ /* The surface was preallocated : seems that we have nothing to do :-) */
WARN("Creates a surface that is already allocated : assuming this is an application bug !\n"); ERR("Creates a surface that is already allocated : assuming this is an application bug !\n");
} }
assert(bpp);
FIXME("using w=%ld, h=%ld, bpp=%d\n",lpdsf->s.surface_desc.dwWidth,lpdsf->s.surface_desc.dwHeight,bpp);
lpdsf->s.surface_desc.dwFlags |= DDSD_PITCH|DDSD_LPSURFACE; lpdsf->s.surface_desc.dwFlags |= DDSD_PITCH|DDSD_LPSURFACE;
lpdsf->s.surface_desc.u1.lpSurface = lpdsf->s.surface_desc.u1.lpSurface =
...@@ -4775,6 +4777,8 @@ static HRESULT WINAPI IDirectDraw2Impl_GetScanLine(LPDIRECTDRAW2 iface, ...@@ -4775,6 +4777,8 @@ static HRESULT WINAPI IDirectDraw2Impl_GetScanLine(LPDIRECTDRAW2 iface,
ICOM_THIS(IDirectDraw2Impl,iface); ICOM_THIS(IDirectDraw2Impl,iface);
FIXME("(%p)->(%p)\n", This, lpdwScanLine); FIXME("(%p)->(%p)\n", This, lpdwScanLine);
if (lpdwScanLine)
*lpdwScanLine = 0;
return DD_OK; return DD_OK;
} }
......
...@@ -213,7 +213,6 @@ struct IDirectDrawSurface2Impl ...@@ -213,7 +213,6 @@ struct IDirectDrawSurface2Impl
struct _dga_directdrawsurface dga; struct _dga_directdrawsurface dga;
struct _xlib_directdrawsurface xlib; struct _xlib_directdrawsurface xlib;
} t; } t;
LPDIRECTDRAWCLIPPER lpClipper;
}; };
/***************************************************************************** /*****************************************************************************
...@@ -230,7 +229,6 @@ struct IDirectDrawSurface3Impl ...@@ -230,7 +229,6 @@ struct IDirectDrawSurface3Impl
struct _dga_directdrawsurface dga; struct _dga_directdrawsurface dga;
struct _xlib_directdrawsurface xlib; struct _xlib_directdrawsurface xlib;
} t; } t;
LPDIRECTDRAWCLIPPER lpClipper;
}; };
/***************************************************************************** /*****************************************************************************
...@@ -248,7 +246,6 @@ struct IDirectDrawSurface4Impl ...@@ -248,7 +246,6 @@ struct IDirectDrawSurface4Impl
struct _dga_directdrawsurface dga; struct _dga_directdrawsurface dga;
struct _xlib_directdrawsurface xlib; struct _xlib_directdrawsurface xlib;
} t; } t;
LPDIRECTDRAWCLIPPER lpClipper;
} ; } ;
struct _surface_chain { struct _surface_chain {
......
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