wined3d: Use WINED3DPRESENT_PARAMETERS in IWineD3DSwapChain::GetPresentParameters.

This commit is contained in:
Stefan Dösinger 2006-03-09 00:49:11 +01:00 committed by Alexandre Julliard
parent abf3a570af
commit 6104c67613
3 changed files with 32 additions and 6 deletions

View File

@ -120,8 +120,22 @@ HRESULT WINAPI IDirect3DSwapChain9Impl_GetDevice(LPDIRECT3DSWAPCHAIN9 iface, IDi
HRESULT WINAPI IDirect3DSwapChain9Impl_GetPresentParameters(LPDIRECT3DSWAPCHAIN9 iface, D3DPRESENT_PARAMETERS* pPresentationParameters) {
IDirect3DSwapChain9Impl *This = (IDirect3DSwapChain9Impl *)iface;
FIXME("(%p) : inplement using WINED3DPRESENT_PARAMERS\n", This);
return IWineD3DSwapChain_GetPresentParameters(This->wineD3DSwapChain, pPresentationParameters);
WINED3DPRESENT_PARAMETERS winePresentParameters;
TRACE("(%p)->(%p): Relay\n", This, pPresentationParameters);
winePresentParameters.BackBufferWidth = &pPresentationParameters->BackBufferWidth;
winePresentParameters.BackBufferHeight = &pPresentationParameters->BackBufferHeight;
winePresentParameters.BackBufferFormat = (WINED3DFORMAT *) &pPresentationParameters->BackBufferFormat;
winePresentParameters.BackBufferCount = &pPresentationParameters->BackBufferCount;
winePresentParameters.MultiSampleType = &pPresentationParameters->MultiSampleType;
winePresentParameters.MultiSampleQuality = &pPresentationParameters->MultiSampleQuality;
winePresentParameters.SwapEffect = &pPresentationParameters->SwapEffect;
winePresentParameters.hDeviceWindow = &pPresentationParameters->hDeviceWindow;
winePresentParameters.Windowed = &pPresentationParameters->Windowed;
winePresentParameters.EnableAutoDepthStencil = &pPresentationParameters->EnableAutoDepthStencil;
winePresentParameters.Flags = &pPresentationParameters->Flags;
winePresentParameters.FullScreen_RefreshRateInHz = &pPresentationParameters->FullScreen_RefreshRateInHz;
winePresentParameters.PresentationInterval = &pPresentationParameters->PresentationInterval;
return IWineD3DSwapChain_GetPresentParameters(This->wineD3DSwapChain, &winePresentParameters);
}

View File

@ -434,10 +434,22 @@ HRESULT WINAPI IWineD3DSwapChainImpl_GetDevice(IWineD3DSwapChain *iface, IWineD3
return D3D_OK;
}
HRESULT WINAPI IWineD3DSwapChainImpl_GetPresentParameters(IWineD3DSwapChain *iface, D3DPRESENT_PARAMETERS *pPresentationParameters) {
HRESULT WINAPI IWineD3DSwapChainImpl_GetPresentParameters(IWineD3DSwapChain *iface, WINED3DPRESENT_PARAMETERS *pPresentationParameters) {
IWineD3DSwapChainImpl *This = (IWineD3DSwapChainImpl *)iface;
FIXME("(%p) : copy\n", This);
memcpy(pPresentationParameters, &This->presentParms, sizeof(D3DPRESENT_PARAMETERS));
TRACE("(%p)\n", This);
*pPresentationParameters->BackBufferWidth = This->presentParms.BackBufferWidth;
*pPresentationParameters->BackBufferHeight = This->presentParms.BackBufferHeight;
*pPresentationParameters->BackBufferFormat = This->presentParms.BackBufferFormat;
*pPresentationParameters->BackBufferCount = This->presentParms.BackBufferCount;
*pPresentationParameters->MultiSampleType = This->presentParms.MultiSampleType;
*pPresentationParameters->MultiSampleQuality = This->presentParms.MultiSampleQuality;
*pPresentationParameters->SwapEffect = This->presentParms.SwapEffect;
*pPresentationParameters->hDeviceWindow = This->presentParms.hDeviceWindow;
*pPresentationParameters->Windowed = This->presentParms.Windowed;
*pPresentationParameters->EnableAutoDepthStencil = This->presentParms.EnableAutoDepthStencil;
*pPresentationParameters->Flags = This->presentParms.Flags;
*pPresentationParameters->FullScreen_RefreshRateInHz = This->presentParms.FullScreen_RefreshRateInHz;
*pPresentationParameters->PresentationInterval = This->presentParms.PresentationInterval;
return D3D_OK;
}

View File

@ -1290,7 +1290,7 @@ DECLARE_INTERFACE_(IWineD3DSwapChain,IWineD3DBase)
STDMETHOD(GetBackBuffer)(THIS_ UINT iBackBuffer, D3DBACKBUFFER_TYPE Type, IWineD3DSurface **ppBackBuffer) PURE;
STDMETHOD(GetRasterStatus)(THIS_ D3DRASTER_STATUS *pRasterStatus) PURE;
STDMETHOD(GetDisplayMode)(THIS_ D3DDISPLAYMODE *pMode) PURE;
STDMETHOD(GetPresentParameters)(THIS_ D3DPRESENT_PARAMETERS *pPresentationParameters) PURE;
STDMETHOD(GetPresentParameters)(THIS_ WINED3DPRESENT_PARAMETERS *pPresentationParameters) PURE;
STDMETHOD(SetGammaRamp)(THIS_ DWORD Flags, const D3DGAMMARAMP *pRamp) PURE;
STDMETHOD(GetGammaRamp)(THIS_ D3DGAMMARAMP *pRamp) PURE;
};