Commit 9e2e594a authored by Robert Shearman's avatar Robert Shearman Committed by Alexandre Julliard

Implement IDirectDrawClipper_GetClipList for case where we have a

handle to a window.
parent 8680ce1a
...@@ -143,14 +143,42 @@ ULONG WINAPI Main_DirectDrawClipper_Release(LPDIRECTDRAWCLIPPER iface) { ...@@ -143,14 +143,42 @@ ULONG WINAPI Main_DirectDrawClipper_Release(LPDIRECTDRAWCLIPPER iface) {
*/ */
HRESULT WINAPI Main_DirectDrawClipper_GetClipList( HRESULT WINAPI Main_DirectDrawClipper_GetClipList(
LPDIRECTDRAWCLIPPER iface, LPRECT lpRect, LPRGNDATA lpClipList, LPDIRECTDRAWCLIPPER iface, LPRECT lpRect, LPRGNDATA lpClipList,
LPDWORD lpdwSize LPDWORD lpdwSize)
) { {
ICOM_THIS(IDirectDrawClipperImpl,iface); ICOM_THIS(IDirectDrawClipperImpl,iface);
TRACE("(%p,%p,%p,%p)\n", This, lpRect, lpClipList, lpdwSize);
if (This->hWnd)
{
HDC hDC = GetDCEx(This->hWnd, NULL, DCX_WINDOW);
if (hDC)
{
HRGN hRgn = CreateRectRgn(0,0,0,0);
if (GetRandomRgn(hDC, hRgn, SYSRGN))
{
if (lpRect)
{
HRGN hRgnClip = CreateRectRgn(lpRect->left, lpRect->top,
lpRect->right, lpRect->bottom);
CombineRgn(hRgn, hRgn, hRgnClip, RGN_AND);
DeleteObject(hRgnClip);
}
*lpdwSize = GetRegionData(hRgn, *lpdwSize, lpClipList);
}
DeleteObject(hRgn);
ReleaseDC(This->hWnd, hDC);
}
return DD_OK;
}
else
{
static int warned = 0; static int warned = 0;
if (warned++ < 10) if (warned++ < 10)
FIXME("(%p,%p,%p,%p),stub!\n",This,lpRect,lpClipList,lpdwSize); FIXME("(%p,%p,%p,%p),stub!\n",This,lpRect,lpClipList,lpdwSize);
if (lpdwSize) *lpdwSize=0; if (lpdwSize) *lpdwSize=0;
return DDERR_NOCLIPLIST; return DDERR_NOCLIPLIST;
}
} }
/*********************************************************************** /***********************************************************************
......
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