Commit 944190ba authored by Józef Kucia's avatar Józef Kucia Committed by Alexandre Julliard

dxgi: Partially implement dxgi_swapchain_GetContainingOutput().

parent 80284177
...@@ -287,9 +287,32 @@ static HRESULT STDMETHODCALLTYPE dxgi_swapchain_ResizeTarget(IDXGISwapChain *ifa ...@@ -287,9 +287,32 @@ static HRESULT STDMETHODCALLTYPE dxgi_swapchain_ResizeTarget(IDXGISwapChain *ifa
static HRESULT STDMETHODCALLTYPE dxgi_swapchain_GetContainingOutput(IDXGISwapChain *iface, IDXGIOutput **output) static HRESULT STDMETHODCALLTYPE dxgi_swapchain_GetContainingOutput(IDXGISwapChain *iface, IDXGIOutput **output)
{ {
FIXME("iface %p, output %p stub!\n", iface, output); IDXGIAdapter *adapter;
IDXGIDevice *device;
HRESULT hr;
return E_NOTIMPL; TRACE("iface %p, output %p.\n", iface, output);
if (FAILED(hr = dxgi_swapchain_GetDevice(iface, &IID_IDXGIDevice, (void **)&device)))
return hr;
hr = IDXGIDevice_GetAdapter(device, &adapter);
IDXGIDevice_Release(device);
if (FAILED(hr))
{
WARN("GetAdapter failed, hr %#x.\n", hr);
return hr;
}
if (SUCCEEDED(IDXGIAdapter_EnumOutputs(adapter, 1, output)))
{
FIXME("Adapter has got multiple outputs, returning the first one.\n");
IDXGIOutput_Release(*output);
}
hr = IDXGIAdapter_EnumOutputs(adapter, 0, output);
IDXGIAdapter_Release(adapter);
return hr;
} }
static HRESULT STDMETHODCALLTYPE dxgi_swapchain_GetFrameStatistics(IDXGISwapChain *iface, DXGI_FRAME_STATISTICS *stats) static HRESULT STDMETHODCALLTYPE dxgi_swapchain_GetFrameStatistics(IDXGISwapChain *iface, DXGI_FRAME_STATISTICS *stats)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment