2020-10-13 09:20:52 +02:00
|
|
|
#define WIN32_LEAN_AND_MEAN
|
|
|
|
#include <windows.h>
|
|
|
|
#include "IDirectDrawClipper.h"
|
|
|
|
#include "ddclipper.h"
|
|
|
|
#include "debug.h"
|
|
|
|
|
|
|
|
|
2021-06-11 20:30:43 +02:00
|
|
|
HRESULT dd_CreateClipper(DWORD dwFlags, IDirectDrawClipperImpl** lplpDDClipper, IUnknown FAR* pUnkOuter)
|
2020-10-13 09:20:52 +02:00
|
|
|
{
|
|
|
|
if (!lplpDDClipper)
|
|
|
|
return DDERR_INVALIDPARAMS;
|
|
|
|
|
2021-06-11 20:30:43 +02:00
|
|
|
IDirectDrawClipperImpl* c =
|
|
|
|
(IDirectDrawClipperImpl*)HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IDirectDrawClipperImpl));
|
|
|
|
|
|
|
|
TRACE(" clipper = %p\n", c);
|
2020-10-13 09:20:52 +02:00
|
|
|
|
2020-10-15 05:13:37 +02:00
|
|
|
c->lpVtbl = &g_ddc_vtbl;
|
2020-10-13 09:20:52 +02:00
|
|
|
IDirectDrawClipper_AddRef(c);
|
|
|
|
|
2021-06-11 20:30:43 +02:00
|
|
|
*lplpDDClipper = c;
|
2020-10-15 05:13:37 +02:00
|
|
|
|
2020-10-13 09:20:52 +02:00
|
|
|
return DD_OK;
|
|
|
|
}
|