From 0ad31f819d4066238199493be2d5a3d58c12d636 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stefan=20D=C3=B6singer?= Date: Sat, 1 Apr 2006 22:06:57 +0200 Subject: [PATCH] wined3d: Add WINED3DBACKBUFFER_TYPE to wined3d_types.h. --- dlls/d3d8/device.c | 2 +- dlls/d3d8/swapchain.c | 2 +- dlls/d3d9/device.c | 2 +- dlls/d3d9/swapchain.c | 2 +- dlls/wined3d/device.c | 2 +- dlls/wined3d/swapchain.c | 2 +- include/wine/wined3d_interface.h | 4 ++-- include/wine/wined3d_types.h | 8 ++++++++ 8 files changed, 16 insertions(+), 8 deletions(-) diff --git a/dlls/d3d8/device.c b/dlls/d3d8/device.c index 3f103b90d0..f21a5dcc3c 100644 --- a/dlls/d3d8/device.c +++ b/dlls/d3d8/device.c @@ -254,7 +254,7 @@ HRESULT WINAPI IDirect3DDevice8Impl_GetBackBuffer(LPDIRECT3DDEVICE8 iface, UINT TRACE("(%p) Relay\n", This); - rc = IWineD3DDevice_GetBackBuffer(This->WineD3DDevice, 0, BackBuffer, Type, (IWineD3DSurface **)&retSurface); + rc = IWineD3DDevice_GetBackBuffer(This->WineD3DDevice, 0, BackBuffer, (WINED3DBACKBUFFER_TYPE) Type, (IWineD3DSurface **)&retSurface); if (rc == D3D_OK && NULL != retSurface && NULL != ppBackBuffer) { IWineD3DSurface_GetParent(retSurface, (IUnknown **)ppBackBuffer); IWineD3DSurface_Release(retSurface); diff --git a/dlls/d3d8/swapchain.c b/dlls/d3d8/swapchain.c index 10389968a7..583b7ec27b 100644 --- a/dlls/d3d8/swapchain.c +++ b/dlls/d3d8/swapchain.c @@ -75,7 +75,7 @@ HRESULT WINAPI IDirect3DSwapChain8Impl_GetBackBuffer(LPDIRECT3DSWAPCHAIN8 iface, TRACE("(%p) Relay\n", This); - hrc = IWineD3DSwapChain_GetBackBuffer(This->wineD3DSwapChain, iBackBuffer, Type, &mySurface); + hrc = IWineD3DSwapChain_GetBackBuffer(This->wineD3DSwapChain, iBackBuffer, (WINED3DBACKBUFFER_TYPE )Type, &mySurface); if (hrc == D3D_OK && NULL != mySurface) { IWineD3DSurface_GetParent(mySurface, (IUnknown **)ppBackBuffer); IWineD3DSurface_Release(mySurface); diff --git a/dlls/d3d9/device.c b/dlls/d3d9/device.c index d1bd70836b..d87eab4b67 100644 --- a/dlls/d3d9/device.c +++ b/dlls/d3d9/device.c @@ -197,7 +197,7 @@ HRESULT WINAPI IDirect3DDevice9Impl_GetBackBuffer(LPDIRECT3DDEVICE9 iface, UIN TRACE("(%p) Relay\n", This); - rc = IWineD3DDevice_GetBackBuffer(This->WineD3DDevice, iSwapChain, BackBuffer, Type, (IWineD3DSurface **)&retSurface); + rc = IWineD3DDevice_GetBackBuffer(This->WineD3DDevice, iSwapChain, BackBuffer, (WINED3DBACKBUFFER_TYPE) Type, (IWineD3DSurface **)&retSurface); if (rc == D3D_OK && NULL != retSurface && NULL != ppBackBuffer) { IWineD3DSurface_GetParent(retSurface, (IUnknown **)ppBackBuffer); IWineD3DSurface_Release(retSurface); diff --git a/dlls/d3d9/swapchain.c b/dlls/d3d9/swapchain.c index 49f33844a8..7382a9e47e 100644 --- a/dlls/d3d9/swapchain.c +++ b/dlls/d3d9/swapchain.c @@ -83,7 +83,7 @@ HRESULT WINAPI IDirect3DSwapChain9Impl_GetBackBuffer(LPDIRECT3DSWAPCHAIN9 iface, TRACE("(%p) Relay\n", This); - hrc = IWineD3DSwapChain_GetBackBuffer(This->wineD3DSwapChain, iBackBuffer, Type, &mySurface); + hrc = IWineD3DSwapChain_GetBackBuffer(This->wineD3DSwapChain, iBackBuffer, (WINED3DBACKBUFFER_TYPE) Type, &mySurface); if (hrc == D3D_OK && NULL != mySurface) { IWineD3DSurface_GetParent(mySurface, (IUnknown **)ppBackBuffer); IWineD3DSurface_Release(mySurface); diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c index 19432ab2cf..ff47d576fa 100644 --- a/dlls/wined3d/device.c +++ b/dlls/wined3d/device.c @@ -4740,7 +4740,7 @@ HRESULT WINAPI IWineD3DDeviceImpl_GetTexture(IWineD3DDevice *iface, DWORD Stage, /***** * Get Back Buffer *****/ -HRESULT WINAPI IWineD3DDeviceImpl_GetBackBuffer(IWineD3DDevice *iface, UINT iSwapChain, UINT BackBuffer, D3DBACKBUFFER_TYPE Type, +HRESULT WINAPI IWineD3DDeviceImpl_GetBackBuffer(IWineD3DDevice *iface, UINT iSwapChain, UINT BackBuffer, WINED3DBACKBUFFER_TYPE Type, IWineD3DSurface **ppBackBuffer) { IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *)iface; IWineD3DSwapChain *swapChain; diff --git a/dlls/wined3d/swapchain.c b/dlls/wined3d/swapchain.c index 6217a8e945..f2e6a56acf 100644 --- a/dlls/wined3d/swapchain.c +++ b/dlls/wined3d/swapchain.c @@ -363,7 +363,7 @@ HRESULT WINAPI IWineD3DSwapChainImpl_GetFrontBufferData(IWineD3DSwapChain *iface return D3D_OK; } -HRESULT WINAPI IWineD3DSwapChainImpl_GetBackBuffer(IWineD3DSwapChain *iface, UINT iBackBuffer, D3DBACKBUFFER_TYPE Type, IWineD3DSurface **ppBackBuffer) { +HRESULT WINAPI IWineD3DSwapChainImpl_GetBackBuffer(IWineD3DSwapChain *iface, UINT iBackBuffer, WINED3DBACKBUFFER_TYPE Type, IWineD3DSurface **ppBackBuffer) { IWineD3DSwapChainImpl *This = (IWineD3DSwapChainImpl *)iface; diff --git a/include/wine/wined3d_interface.h b/include/wine/wined3d_interface.h index f1bd855d18..8a007f57c5 100644 --- a/include/wine/wined3d_interface.h +++ b/include/wine/wined3d_interface.h @@ -323,7 +323,7 @@ DECLARE_INTERFACE_(IWineD3DDevice,IWineD3DBase) STDMETHOD(CreatePixelShader)(THIS_ CONST DWORD* pFunction, struct IWineD3DPixelShader** ppShader, IUnknown *pParent) PURE; STDMETHOD(EvictManagedResources)(THIS) PURE; STDMETHOD_(UINT, GetAvailableTextureMem)(THIS) PURE; - STDMETHOD(GetBackBuffer)(THIS_ UINT iSwapChain, UINT BackBuffer, D3DBACKBUFFER_TYPE, struct IWineD3DSurface** ppBackBuffer) PURE; + STDMETHOD(GetBackBuffer)(THIS_ UINT iSwapChain, UINT BackBuffer, WINED3DBACKBUFFER_TYPE, struct IWineD3DSurface** ppBackBuffer) PURE; STDMETHOD(GetCreationParameters)(THIS_ D3DDEVICE_CREATION_PARAMETERS *pParameters) PURE; STDMETHOD(GetDeviceCaps)(THIS_ WINED3DCAPS* pCaps) PURE; STDMETHOD(GetDirect3D)(THIS_ IWineD3D** ppD3D) PURE; @@ -1292,7 +1292,7 @@ DECLARE_INTERFACE_(IWineD3DSwapChain,IWineD3DBase) STDMETHOD(GetDevice)(THIS_ IWineD3DDevice **ppDevice) PURE; STDMETHOD(Present)(THIS_ CONST RECT *pSourceRect, CONST RECT *pDestRect, HWND hDestWindowOverride, CONST RGNDATA *pDirtyRegion, DWORD dwFlags) PURE; STDMETHOD(GetFrontBufferData)(THIS_ IWineD3DSurface *pDestSurface) PURE; - STDMETHOD(GetBackBuffer)(THIS_ UINT iBackBuffer, D3DBACKBUFFER_TYPE Type, IWineD3DSurface **ppBackBuffer) PURE; + STDMETHOD(GetBackBuffer)(THIS_ UINT iBackBuffer, WINED3DBACKBUFFER_TYPE Type, IWineD3DSurface **ppBackBuffer) PURE; STDMETHOD(GetRasterStatus)(THIS_ D3DRASTER_STATUS *pRasterStatus) PURE; STDMETHOD(GetDisplayMode)(THIS_ WINED3DDISPLAYMODE *pMode) PURE; STDMETHOD(GetPresentParameters)(THIS_ WINED3DPRESENT_PARAMETERS *pPresentationParameters) PURE; diff --git a/include/wine/wined3d_types.h b/include/wine/wined3d_types.h index 52cf817c23..a072981520 100644 --- a/include/wine/wined3d_types.h +++ b/include/wine/wined3d_types.h @@ -360,6 +360,14 @@ typedef struct _WINED3DDISPLAYMODE { WINED3DFORMAT Format; } WINED3DDISPLAYMODE; +typedef enum _WINED3DBACKBUFFER_TYPE { + WINED3DBACKBUFFER_TYPE_MONO = 0, + WINED3DBACKBUFFER_TYPE_LEFT = 1, + WINED3DBACKBUFFER_TYPE_RIGHT = 2, + + WINED3DBACKBUFFER_TYPE_FORCE_DWORD = 0x7fffffff +} WINED3DBACKBUFFER_TYPE; + typedef enum _WINED3DSWAPEFFECT { WINED3DSWAPEFFECT_DISCARD = 1, WINED3DSWAPEFFECT_FLIP = 2,