diff --git a/dlls/d3d9/d3d9_private.h b/dlls/d3d9/d3d9_private.h index 042a394501c..cbe5d808879 100644 --- a/dlls/d3d9/d3d9_private.h +++ b/dlls/d3d9/d3d9_private.h @@ -563,8 +563,4 @@ typedef struct IDirect3DQuery9Impl { LPDIRECT3DDEVICE9EX parentDevice; } IDirect3DQuery9Impl; - -/* Callbacks */ -extern ULONG WINAPI D3D9CB_DestroySwapChain (IWineD3DSwapChain *pSwapChain) DECLSPEC_HIDDEN; - #endif /* __WINE_D3D9_PRIVATE_H */ diff --git a/dlls/d3d9/device.c b/dlls/d3d9/device.c index 653395ee283..1151d990ab6 100644 --- a/dlls/d3d9/device.c +++ b/dlls/d3d9/device.c @@ -181,6 +181,17 @@ static UINT vertex_count_from_primitive_count(D3DPRIMITIVETYPE primitive_type, U } } +static ULONG WINAPI D3D9CB_DestroySwapChain(IWineD3DSwapChain *swapchain) +{ + IDirect3DSwapChain9Impl *parent; + + TRACE("swapchain %p.\n", swapchain); + + IWineD3DSwapChain_GetParent(swapchain, (IUnknown **)&parent); + parent->isImplicit = FALSE; + return IDirect3DSwapChain9_Release((IDirect3DSwapChain9 *)parent); +} + /* IDirect3D IUnknown parts follow: */ static HRESULT WINAPI IDirect3DDevice9Impl_QueryInterface(LPDIRECT3DDEVICE9EX iface, REFIID riid, LPVOID* ppobj) { IDirect3DDevice9Impl *This = (IDirect3DDevice9Impl *)iface; diff --git a/dlls/d3d9/directx.c b/dlls/d3d9/directx.c index 18c9955eab5..939538158a7 100644 --- a/dlls/d3d9/directx.c +++ b/dlls/d3d9/directx.c @@ -407,16 +407,6 @@ static HMONITOR WINAPI IDirect3D9Impl_GetAdapterMonitor(LPDIRECT3D9EX iface, UIN return ret; } -ULONG WINAPI D3D9CB_DestroySwapChain(IWineD3DSwapChain *pSwapChain) { - IDirect3DSwapChain9Impl* swapChainParent; - TRACE("(%p) call back\n", pSwapChain); - - IWineD3DSwapChain_GetParent(pSwapChain,(IUnknown **) &swapChainParent); - swapChainParent->isImplicit = FALSE; - /* Swap chain had refcount of 0 GetParent addrefed to 1, so 1 Release is enough */ - return IDirect3DSwapChain9_Release((IDirect3DSwapChain9*) swapChainParent); -} - static HRESULT WINAPI DECLSPEC_HOTPATCH IDirect3D9Impl_CreateDevice(IDirect3D9Ex *iface, UINT adapter, D3DDEVTYPE device_type, HWND focus_window, DWORD flags, D3DPRESENT_PARAMETERS *parameters, IDirect3DDevice9 **device)