[PATCH 3/5] dxgi: Implement dxgi_output_SetPrivateData().

Henri Verbeet hverbeet at codeweavers.com
Mon Feb 16 05:25:52 CST 2015


---
 dlls/dxgi/dxgi_private.h |    1 +
 dlls/dxgi/output.c       |    8 ++++++--
 2 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/dlls/dxgi/dxgi_private.h b/dlls/dxgi/dxgi_private.h
index 45f2404..727a75f 100644
--- a/dlls/dxgi/dxgi_private.h
+++ b/dlls/dxgi/dxgi_private.h
@@ -119,6 +119,7 @@ struct dxgi_output
 {
     IDXGIOutput IDXGIOutput_iface;
     LONG refcount;
+    struct wined3d_private_store private_store;
     struct dxgi_adapter *adapter;
 };
 
diff --git a/dlls/dxgi/output.c b/dlls/dxgi/output.c
index f4a5c29..326c128 100644
--- a/dlls/dxgi/output.c
+++ b/dlls/dxgi/output.c
@@ -68,6 +68,7 @@ static ULONG STDMETHODCALLTYPE dxgi_output_Release(IDXGIOutput *iface)
 
     if (!refcount)
     {
+        wined3d_private_store_cleanup(&This->private_store);
         HeapFree(GetProcessHeap(), 0, This);
     }
 
@@ -79,9 +80,11 @@ static ULONG STDMETHODCALLTYPE dxgi_output_Release(IDXGIOutput *iface)
 static HRESULT STDMETHODCALLTYPE dxgi_output_SetPrivateData(IDXGIOutput *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_output *output = impl_from_IDXGIOutput(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(&output->private_store, guid, data_size, data);
 }
 
 static HRESULT STDMETHODCALLTYPE dxgi_output_SetPrivateDataInterface(IDXGIOutput *iface,
@@ -289,5 +292,6 @@ void dxgi_output_init(struct dxgi_output *output, struct dxgi_adapter *adapter)
 {
     output->IDXGIOutput_iface.lpVtbl = &dxgi_output_vtbl;
     output->refcount = 1;
+    wined3d_private_store_init(&output->private_store);
     output->adapter = adapter;
 }
-- 
1.7.10.4




More information about the wine-patches mailing list