wined3d: Use WINED3DPRESENT_PARAMETERS in IWineD3DSwapChain::GetPresentParameters.
This commit is contained in:
parent
abf3a570af
commit
6104c67613
|
@ -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);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
@ -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;
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue