dxgi: Implement IDXGIOutput::GetParent().

This commit is contained in:
Henri Verbeet 2009-12-03 11:38:19 +01:00 committed by Alexandre Julliard
parent 77933a925b
commit aa85b4c61d
3 changed files with 9 additions and 5 deletions

View File

@ -189,7 +189,7 @@ HRESULT dxgi_adapter_init(struct dxgi_adapter *adapter, IDXGIFactory *parent, UI
{
return E_OUTOFMEMORY;
}
dxgi_output_init(output);
dxgi_output_init(output, adapter);
adapter->output = (IDXGIOutput *)output;
return S_OK;

View File

@ -102,9 +102,10 @@ struct dxgi_output
{
const struct IDXGIOutputVtbl *vtbl;
LONG refcount;
struct dxgi_adapter *adapter;
};
void dxgi_output_init(struct dxgi_output *output) DECLSPEC_HIDDEN;
void dxgi_output_init(struct dxgi_output *output, struct dxgi_adapter *adapter) DECLSPEC_HIDDEN;
/* IDXGIAdapter */
struct dxgi_adapter

View File

@ -98,9 +98,11 @@ static HRESULT STDMETHODCALLTYPE dxgi_output_GetPrivateData(IDXGIOutput *iface,
static HRESULT STDMETHODCALLTYPE dxgi_output_GetParent(IDXGIOutput *iface,
REFIID riid, void **parent)
{
FIXME("iface %p, riid %s, parent %p stub!\n", iface, debugstr_guid(riid), parent);
struct dxgi_output *This = (struct dxgi_output *)iface;
return E_NOTIMPL;
TRACE("iface %p, riid %s, parent %p.\n", iface, debugstr_guid(riid), parent);
return IDXGIAdapter_QueryInterface((IDXGIAdapter *)This->adapter, riid, parent);
}
/* IDXGIOutput methods */
@ -217,8 +219,9 @@ static const struct IDXGIOutputVtbl dxgi_output_vtbl =
dxgi_output_GetFrameStatistics,
};
void dxgi_output_init(struct dxgi_output *output)
void dxgi_output_init(struct dxgi_output *output, struct dxgi_adapter *adapter)
{
output->vtbl = &dxgi_output_vtbl;
output->refcount = 1;
output->adapter = adapter;
}