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

dxgi: Implement IDXGIFactory5.

parent d35a25df
...@@ -72,7 +72,7 @@ static ULONG STDMETHODCALLTYPE dxgi_adapter_Release(IWineDXGIAdapter *iface) ...@@ -72,7 +72,7 @@ static ULONG STDMETHODCALLTYPE dxgi_adapter_Release(IWineDXGIAdapter *iface)
if (!refcount) if (!refcount)
{ {
wined3d_private_store_cleanup(&adapter->private_store); wined3d_private_store_cleanup(&adapter->private_store);
IDXGIFactory4_Release(&adapter->factory->IDXGIFactory4_iface); IWineDXGIFactory_Release(&adapter->factory->IWineDXGIFactory_iface);
heap_free(adapter); heap_free(adapter);
} }
...@@ -115,7 +115,7 @@ static HRESULT STDMETHODCALLTYPE dxgi_adapter_GetParent(IWineDXGIAdapter *iface, ...@@ -115,7 +115,7 @@ static HRESULT STDMETHODCALLTYPE dxgi_adapter_GetParent(IWineDXGIAdapter *iface,
TRACE("iface %p, iid %s, parent %p.\n", iface, debugstr_guid(iid), parent); TRACE("iface %p, iid %s, parent %p.\n", iface, debugstr_guid(iid), parent);
return IDXGIFactory4_QueryInterface(&adapter->factory->IDXGIFactory4_iface, iid, parent); return IWineDXGIFactory_QueryInterface(&adapter->factory->IWineDXGIFactory_iface, iid, parent);
} }
static HRESULT STDMETHODCALLTYPE dxgi_adapter_EnumOutputs(IWineDXGIAdapter *iface, static HRESULT STDMETHODCALLTYPE dxgi_adapter_EnumOutputs(IWineDXGIAdapter *iface,
...@@ -351,7 +351,7 @@ static void dxgi_adapter_init(struct dxgi_adapter *adapter, struct dxgi_factory ...@@ -351,7 +351,7 @@ static void dxgi_adapter_init(struct dxgi_adapter *adapter, struct dxgi_factory
wined3d_private_store_init(&adapter->private_store); wined3d_private_store_init(&adapter->private_store);
adapter->ordinal = ordinal; adapter->ordinal = ordinal;
adapter->factory = factory; adapter->factory = factory;
IDXGIFactory4_AddRef(&adapter->factory->IDXGIFactory4_iface); IWineDXGIFactory_AddRef(&adapter->factory->IWineDXGIFactory_iface);
} }
HRESULT dxgi_adapter_create(struct dxgi_factory *factory, UINT ordinal, struct dxgi_adapter **adapter) HRESULT dxgi_adapter_create(struct dxgi_factory *factory, UINT ordinal, struct dxgi_adapter **adapter)
......
...@@ -373,7 +373,7 @@ HRESULT dxgi_device_init(struct dxgi_device *device, struct dxgi_device_layer *l ...@@ -373,7 +373,7 @@ HRESULT dxgi_device_init(struct dxgi_device *device, struct dxgi_device_layer *l
void *layer_base; void *layer_base;
HRESULT hr; HRESULT hr;
if (!(dxgi_factory = unsafe_impl_from_IDXGIFactory4((IDXGIFactory4 *)factory))) if (!(dxgi_factory = unsafe_impl_from_IDXGIFactory(factory)))
{ {
WARN("This is not the factory we're looking for.\n"); WARN("This is not the factory we're looking for.\n");
return E_FAIL; return E_FAIL;
......
...@@ -107,7 +107,7 @@ HRESULT dxgi_set_private_data_interface(struct wined3d_private_store *store, ...@@ -107,7 +107,7 @@ HRESULT dxgi_set_private_data_interface(struct wined3d_private_store *store,
/* IDXGIFactory */ /* IDXGIFactory */
struct dxgi_factory struct dxgi_factory
{ {
IDXGIFactory4 IDXGIFactory4_iface; IWineDXGIFactory IWineDXGIFactory_iface;
LONG refcount; LONG refcount;
struct wined3d_private_store private_store; struct wined3d_private_store private_store;
struct wined3d *wined3d; struct wined3d *wined3d;
...@@ -117,7 +117,7 @@ struct dxgi_factory ...@@ -117,7 +117,7 @@ struct dxgi_factory
HRESULT dxgi_factory_create(REFIID riid, void **factory, BOOL extended) DECLSPEC_HIDDEN; HRESULT dxgi_factory_create(REFIID riid, void **factory, BOOL extended) DECLSPEC_HIDDEN;
HWND dxgi_factory_get_device_window(struct dxgi_factory *factory) DECLSPEC_HIDDEN; HWND dxgi_factory_get_device_window(struct dxgi_factory *factory) DECLSPEC_HIDDEN;
struct dxgi_factory *unsafe_impl_from_IDXGIFactory4(IDXGIFactory4 *iface) DECLSPEC_HIDDEN; struct dxgi_factory *unsafe_impl_from_IDXGIFactory(IDXGIFactory *iface) DECLSPEC_HIDDEN;
/* IDXGIDevice */ /* IDXGIDevice */
struct dxgi_device struct dxgi_device
......
...@@ -64,6 +64,8 @@ static HRESULT check_interface_(unsigned int line, void *iface, REFIID iid, ...@@ -64,6 +64,8 @@ static HRESULT check_interface_(unsigned int line, void *iface, REFIID iid,
"Got hr %#x, expected %#x.\n", hr, expected_hr); "Got hr %#x, expected %#x.\n", hr, expected_hr);
if (SUCCEEDED(hr)) if (SUCCEEDED(hr))
IUnknown_Release(out); IUnknown_Release(out);
else
ok_(__FILE__, line)(!out, "Got unexpected pointer %p.\n", out);
return hr; return hr;
} }
...@@ -2611,7 +2613,7 @@ static void test_create_factory(void) ...@@ -2611,7 +2613,7 @@ static void test_create_factory(void)
check_interface(iface, &IID_IDXGIFactory3, TRUE, FALSE); check_interface(iface, &IID_IDXGIFactory3, TRUE, FALSE);
/* Not available on all Windows versions. */ /* Not available on all Windows versions. */
check_interface(iface, &IID_IDXGIFactory4, TRUE, TRUE); check_interface(iface, &IID_IDXGIFactory4, TRUE, TRUE);
todo_wine check_interface(iface, &IID_IDXGIFactory5, TRUE, TRUE); check_interface(iface, &IID_IDXGIFactory5, TRUE, TRUE);
refcount = IUnknown_Release(iface); refcount = IUnknown_Release(iface);
ok(!refcount, "Factory has %u references left.\n", refcount); ok(!refcount, "Factory has %u references left.\n", refcount);
......
...@@ -65,6 +65,6 @@ interface IWineDXGIAdapter : IDXGIAdapter3 ...@@ -65,6 +65,6 @@ interface IWineDXGIAdapter : IDXGIAdapter3
local, local,
uuid(ea02a0d1-4c95-488a-a82c-6034621e8c4f) uuid(ea02a0d1-4c95-488a-a82c-6034621e8c4f)
] ]
interface IWineDXGIFactory : IDXGIFactory4 interface IWineDXGIFactory : IDXGIFactory5
{ {
} }
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