wined3d: Clippers don't need parents.
This commit is contained in:
parent
7c675b522a
commit
b84d1ce5f7
|
@ -309,7 +309,7 @@ HRESULT ddraw_clipper_init(IDirectDrawClipperImpl *clipper)
|
|||
{
|
||||
clipper->lpVtbl = &ddraw_clipper_vtbl;
|
||||
clipper->ref = 1;
|
||||
clipper->wineD3DClipper = pWineDirect3DCreateClipper((IUnknown *)clipper);
|
||||
clipper->wineD3DClipper = pWineDirect3DCreateClipper();
|
||||
if (!clipper->wineD3DClipper)
|
||||
{
|
||||
WARN("Failed to create wined3d clipper.\n");
|
||||
|
|
|
@ -33,7 +33,6 @@ static HRESULT WINAPI IWineD3DClipperImpl_QueryInterface(IWineD3DClipper *iface,
|
|||
TRACE("iface %p, riid %s, object %p.\n", iface, debugstr_guid(riid), object);
|
||||
|
||||
if (IsEqualGUID(riid, &IID_IWineD3DClipper)
|
||||
|| IsEqualGUID(riid, &IID_IWineD3DBase)
|
||||
|| IsEqualGUID(riid, &IID_IUnknown))
|
||||
{
|
||||
IUnknown_AddRef(iface);
|
||||
|
@ -72,16 +71,6 @@ static ULONG WINAPI IWineD3DClipperImpl_Release(IWineD3DClipper *iface)
|
|||
else return ref;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI IWineD3DClipperImpl_GetParent(IWineD3DClipper *iface, IUnknown **Parent)
|
||||
{
|
||||
IWineD3DClipperImpl *This = (IWineD3DClipperImpl *)iface;
|
||||
TRACE("(%p)->(%p)\n", This, Parent);
|
||||
|
||||
*Parent = This->Parent;
|
||||
IUnknown_AddRef(*Parent);
|
||||
return WINED3D_OK;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI IWineD3DClipperImpl_SetHwnd(IWineD3DClipper *iface, DWORD Flags, HWND hWnd)
|
||||
{
|
||||
IWineD3DClipperImpl *This = (IWineD3DClipperImpl *)iface;
|
||||
|
@ -176,7 +165,6 @@ static const IWineD3DClipperVtbl IWineD3DClipper_Vtbl =
|
|||
IWineD3DClipperImpl_QueryInterface,
|
||||
IWineD3DClipperImpl_AddRef,
|
||||
IWineD3DClipperImpl_Release,
|
||||
IWineD3DClipperImpl_GetParent,
|
||||
IWineD3DClipperImpl_GetClipList,
|
||||
IWineD3DClipperImpl_GetHwnd,
|
||||
IWineD3DClipperImpl_IsClipListChanged,
|
||||
|
@ -184,11 +172,12 @@ static const IWineD3DClipperVtbl IWineD3DClipper_Vtbl =
|
|||
IWineD3DClipperImpl_SetHwnd
|
||||
};
|
||||
|
||||
IWineD3DClipper* WINAPI WineDirect3DCreateClipper(IUnknown *Parent)
|
||||
IWineD3DClipper * WINAPI WineDirect3DCreateClipper(void)
|
||||
{
|
||||
IWineD3DClipperImpl *obj;
|
||||
|
||||
TRACE("Creating clipper, parent %p\n", Parent);
|
||||
TRACE("\n");
|
||||
|
||||
obj = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*obj));
|
||||
if(!obj)
|
||||
{
|
||||
|
@ -197,7 +186,6 @@ IWineD3DClipper* WINAPI WineDirect3DCreateClipper(IUnknown *Parent)
|
|||
}
|
||||
|
||||
obj->lpVtbl = &IWineD3DClipper_Vtbl;
|
||||
obj->Parent = Parent;
|
||||
|
||||
IWineD3DClipper_AddRef((IWineD3DClipper *)obj);
|
||||
return (IWineD3DClipper *) obj;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
@ stdcall WineDirect3DCreate(long ptr)
|
||||
@ stdcall WineDirect3DCreateClipper(ptr)
|
||||
@ stdcall WineDirect3DCreateClipper()
|
||||
@ stdcall wined3d_mutex_lock()
|
||||
@ stdcall wined3d_mutex_unlock()
|
||||
|
|
|
@ -2001,7 +2001,6 @@ typedef struct IWineD3DClipperImpl
|
|||
const IWineD3DClipperVtbl *lpVtbl;
|
||||
LONG ref;
|
||||
|
||||
IUnknown *Parent;
|
||||
HWND hWnd;
|
||||
} IWineD3DClipperImpl;
|
||||
|
||||
|
|
|
@ -2344,7 +2344,7 @@ interface IWineD3DPalette : IWineD3DBase
|
|||
local,
|
||||
uuid(8f2bceb1-d338-488c-ab7f-0ec980bf5d2d)
|
||||
]
|
||||
interface IWineD3DClipper : IWineD3DBase
|
||||
interface IWineD3DClipper : IUnknown
|
||||
{
|
||||
HRESULT GetClipList(
|
||||
[in] const RECT *rect,
|
||||
|
@ -3389,6 +3389,6 @@ interface IWineD3DDevice : IUnknown
|
|||
}
|
||||
|
||||
IWineD3D * __stdcall WineDirect3DCreate(UINT dxVersion, IUnknown *parent);
|
||||
IWineD3DClipper * __stdcall WineDirect3DCreateClipper(IUnknown *parent);
|
||||
IWineD3DClipper * __stdcall WineDirect3DCreateClipper(void);
|
||||
void __stdcall wined3d_mutex_lock(void);
|
||||
void __stdcall wined3d_mutex_unlock(void);
|
||||
|
|
Loading…
Reference in New Issue