[PATCH 5/5] dxgi: Implement dxgi_factory_SetPrivateData().
Henri Verbeet
hverbeet at codeweavers.com
Fri Feb 13 03:40:52 CST 2015
---
dlls/dxgi/dxgi_private.h | 1 +
dlls/dxgi/factory.c | 10 ++++++++--
2 files changed, 9 insertions(+), 2 deletions(-)
diff --git a/dlls/dxgi/dxgi_private.h b/dlls/dxgi/dxgi_private.h
index 6653c21..45f2404 100644
--- a/dlls/dxgi/dxgi_private.h
+++ b/dlls/dxgi/dxgi_private.h
@@ -88,6 +88,7 @@ struct dxgi_factory
{
IDXGIFactory1 IDXGIFactory1_iface;
LONG refcount;
+ struct wined3d_private_store private_store;
struct wined3d *wined3d;
UINT adapter_count;
IDXGIAdapter1 **adapters;
diff --git a/dlls/dxgi/factory.c b/dlls/dxgi/factory.c
index 1e22f6f..13b72f0 100644
--- a/dlls/dxgi/factory.c
+++ b/dlls/dxgi/factory.c
@@ -83,6 +83,7 @@ static ULONG STDMETHODCALLTYPE dxgi_factory_Release(IDXGIFactory1 *iface)
EnterCriticalSection(&dxgi_cs);
wined3d_decref(factory->wined3d);
LeaveCriticalSection(&dxgi_cs);
+ wined3d_private_store_cleanup(&factory->private_store);
HeapFree(GetProcessHeap(), 0, factory);
}
@@ -92,9 +93,11 @@ static ULONG STDMETHODCALLTYPE dxgi_factory_Release(IDXGIFactory1 *iface)
static HRESULT STDMETHODCALLTYPE dxgi_factory_SetPrivateData(IDXGIFactory1 *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_factory *factory = impl_from_IDXGIFactory1(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(&factory->private_store, guid, data_size, data);
}
static HRESULT STDMETHODCALLTYPE dxgi_factory_SetPrivateDataInterface(IDXGIFactory1 *iface,
@@ -284,12 +287,14 @@ static HRESULT dxgi_factory_init(struct dxgi_factory *factory, BOOL extended)
factory->IDXGIFactory1_iface.lpVtbl = &dxgi_factory_vtbl;
factory->refcount = 1;
+ wined3d_private_store_init(&factory->private_store);
EnterCriticalSection(&dxgi_cs);
factory->wined3d = wined3d_create(0);
if (!factory->wined3d)
{
LeaveCriticalSection(&dxgi_cs);
+ wined3d_private_store_cleanup(&factory->private_store);
return DXGI_ERROR_UNSUPPORTED;
}
@@ -346,6 +351,7 @@ fail:
EnterCriticalSection(&dxgi_cs);
wined3d_decref(factory->wined3d);
LeaveCriticalSection(&dxgi_cs);
+ wined3d_private_store_cleanup(&factory->private_store);
return hr;
}
--
1.7.10.4
More information about the wine-patches
mailing list