wined3d: Cleanup IWineD3DDeviceImpl_GetBackBuffer().
This commit is contained in:
parent
35d5e7669e
commit
bd1ec9eb02
|
@ -4009,24 +4009,33 @@ static HRESULT WINAPI IWineD3DDeviceImpl_GetTexture(IWineD3DDevice *iface, DWORD
|
||||||
/*****
|
/*****
|
||||||
* Get Back Buffer
|
* Get Back Buffer
|
||||||
*****/
|
*****/
|
||||||
static HRESULT WINAPI IWineD3DDeviceImpl_GetBackBuffer(IWineD3DDevice *iface, UINT iSwapChain, UINT BackBuffer, WINED3DBACKBUFFER_TYPE Type,
|
static HRESULT WINAPI IWineD3DDeviceImpl_GetBackBuffer(IWineD3DDevice *iface, UINT swapchain_idx,
|
||||||
IWineD3DSurface **ppBackBuffer) {
|
UINT backbuffer_idx, WINED3DBACKBUFFER_TYPE backbuffer_type, IWineD3DSurface **backbuffer)
|
||||||
IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *)iface;
|
{
|
||||||
IWineD3DSwapChain *swapChain;
|
IWineD3DSwapChain *swapchain;
|
||||||
HRESULT hr;
|
HRESULT hr;
|
||||||
|
|
||||||
TRACE("(%p) : BackBuf %d Type %d SwapChain %d returning %p\n", This, BackBuffer, Type, iSwapChain, *ppBackBuffer);
|
TRACE("iface %p, swapchain_idx %u, backbuffer_idx %u, backbuffer_type %#x, backbuffer %p.\n",
|
||||||
|
iface, swapchain_idx, backbuffer_idx, backbuffer_type, backbuffer);
|
||||||
|
|
||||||
hr = IWineD3DDeviceImpl_GetSwapChain(iface, iSwapChain, &swapChain);
|
hr = IWineD3DDeviceImpl_GetSwapChain(iface, swapchain_idx, &swapchain);
|
||||||
if (hr == WINED3D_OK) {
|
if (FAILED(hr))
|
||||||
hr = IWineD3DSwapChain_GetBackBuffer(swapChain, BackBuffer, Type, ppBackBuffer);
|
{
|
||||||
IWineD3DSwapChain_Release(swapChain);
|
WARN("Failed to get swapchain %u, hr %#x.\n", swapchain_idx, hr);
|
||||||
} else {
|
|
||||||
*ppBackBuffer = NULL;
|
|
||||||
}
|
|
||||||
return hr;
|
return hr;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
hr = IWineD3DSwapChain_GetBackBuffer(swapchain, backbuffer_idx, backbuffer_type, backbuffer);
|
||||||
|
IWineD3DSwapChain_Release(swapchain);
|
||||||
|
if (FAILED(hr))
|
||||||
|
{
|
||||||
|
WARN("Failed to get backbuffer %u, hr %#x.\n", backbuffer_idx, hr);
|
||||||
|
return hr;
|
||||||
|
}
|
||||||
|
|
||||||
|
return WINED3D_OK;
|
||||||
|
}
|
||||||
|
|
||||||
static HRESULT WINAPI IWineD3DDeviceImpl_GetDeviceCaps(IWineD3DDevice *iface, WINED3DCAPS* pCaps) {
|
static HRESULT WINAPI IWineD3DDeviceImpl_GetDeviceCaps(IWineD3DDevice *iface, WINED3DCAPS* pCaps) {
|
||||||
IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *)iface;
|
IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *)iface;
|
||||||
WARN("(%p) : stub, calling idirect3d for now\n", This);
|
WARN("(%p) : stub, calling idirect3d for now\n", This);
|
||||||
|
|
Loading…
Reference in New Issue