mirror of
https://github.com/FunkyFr3sh/cnc-ddraw.git
synced 2025-03-15 06:04:49 +01:00
#209 support clipper from hwnd for New Robinson
This commit is contained in:
parent
d2557c66c8
commit
e61e0d2321
@ -7,9 +7,6 @@
|
||||
|
||||
HRESULT ddc_GetClipList(IDirectDrawClipperImpl* This, LPRECT lpRect, LPRGNDATA lpClipList, LPDWORD lpdwSiz)
|
||||
{
|
||||
return DDERR_NOCLIPLIST;
|
||||
|
||||
/* Keep this commented out until we found a game that actually needs it
|
||||
if (!This->region)
|
||||
return DDERR_NOCLIPLIST;
|
||||
|
||||
@ -45,7 +42,6 @@ HRESULT ddc_GetClipList(IDirectDrawClipperImpl* This, LPRECT lpRect, LPRGNDATA l
|
||||
return DDERR_REGIONTOOSMALL;
|
||||
|
||||
return DD_OK;
|
||||
*/
|
||||
}
|
||||
|
||||
HRESULT ddc_GetHWnd(IDirectDrawClipperImpl* This, HWND FAR* lphWnd)
|
||||
|
@ -988,8 +988,20 @@ HRESULT dds_ReleaseDC(IDirectDrawSurfaceImpl* This, HDC hDC)
|
||||
HRESULT dds_SetClipper(IDirectDrawSurfaceImpl* This, IDirectDrawClipperImpl* lpClipper)
|
||||
{
|
||||
if (lpClipper)
|
||||
{
|
||||
IDirectDrawClipper_AddRef(lpClipper);
|
||||
|
||||
if ((This->caps & DDSCAPS_PRIMARYSURFACE) && lpClipper->hwnd)
|
||||
{
|
||||
if (lpClipper->region)
|
||||
DeleteObject(lpClipper->region);
|
||||
|
||||
RECT rc = { 0, 0, This->width, This->height };
|
||||
|
||||
lpClipper->region = CreateRectRgnIndirect(&rc);
|
||||
}
|
||||
}
|
||||
|
||||
if (This->clipper)
|
||||
IDirectDrawClipper_Release(This->clipper);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user