Commit 9dfd95c6 authored by Henri Verbeet's avatar Henri Verbeet Committed by Alexandre Julliard

dxgi: Implement dxgi_adapter_SetPrivateData().

parent 849149d5
......@@ -69,6 +69,7 @@ static ULONG STDMETHODCALLTYPE dxgi_adapter_Release(IDXGIAdapter1 *iface)
if (!refcount)
{
IDXGIOutput_Release(adapter->output);
wined3d_private_store_cleanup(&adapter->private_store);
HeapFree(GetProcessHeap(), 0, adapter);
}
......@@ -78,9 +79,11 @@ static ULONG STDMETHODCALLTYPE dxgi_adapter_Release(IDXGIAdapter1 *iface)
static HRESULT STDMETHODCALLTYPE dxgi_adapter_SetPrivateData(IDXGIAdapter1 *iface,
REFGUID guid, UINT data_size, const void *data)
{
FIXME("iface %p, guid %s, data_size %u, data %p stub!\n", iface, debugstr_guid(guid), data_size, data);
struct dxgi_adapter *adapter = impl_from_IDXGIAdapter1(iface);
return E_NOTIMPL;
TRACE("iface %p, guid %s, data_size %u, data %p.\n", iface, debugstr_guid(guid), data_size, data);
return dxgi_set_private_data(&adapter->private_store, guid, data_size, data);
}
static HRESULT STDMETHODCALLTYPE dxgi_adapter_SetPrivateDataInterface(IDXGIAdapter1 *iface,
......@@ -228,11 +231,12 @@ HRESULT dxgi_adapter_init(struct dxgi_adapter *adapter, struct dxgi_factory *par
adapter->IDXGIAdapter1_iface.lpVtbl = &dxgi_adapter_vtbl;
adapter->parent = parent;
adapter->refcount = 1;
wined3d_private_store_init(&adapter->private_store);
adapter->ordinal = ordinal;
output = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*output));
if (!output)
if (!(output = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*output))))
{
wined3d_private_store_cleanup(&adapter->private_store);
return E_OUTOFMEMORY;
}
dxgi_output_init(output, adapter);
......
......@@ -129,6 +129,7 @@ struct dxgi_adapter
IDXGIAdapter1 IDXGIAdapter1_iface;
struct dxgi_factory *parent;
LONG refcount;
struct wined3d_private_store private_store;
UINT ordinal;
IDXGIOutput *output;
};
......
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