Henri Verbeet : d3d9: Move D3D9CB_DestroySwapChain() to device.c.
Alexandre Julliard
julliard at winehq.org
Wed Nov 18 09:40:41 CST 2009
Module: wine
Branch: master
Commit: 434a23d90dfeefb31522e2cb3f051557c9f5f375
URL: http://source.winehq.org/git/wine.git/?a=commit;h=434a23d90dfeefb31522e2cb3f051557c9f5f375
Author: Henri Verbeet <hverbeet at codeweavers.com>
Date: Wed Nov 18 10:45:51 2009 +0100
d3d9: Move D3D9CB_DestroySwapChain() to device.c.
---
dlls/d3d9/d3d9_private.h | 4 ----
dlls/d3d9/device.c | 11 +++++++++++
dlls/d3d9/directx.c | 10 ----------
3 files changed, 11 insertions(+), 14 deletions(-)
diff --git a/dlls/d3d9/d3d9_private.h b/dlls/d3d9/d3d9_private.h
index 042a394..cbe5d80 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 653395e..1151d99 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 18c9955..9395381 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)
More information about the wine-cvs
mailing list