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)
if (!refcount)
{
wined3d_private_store_cleanup(&adapter->private_store);
IDXGIFactory4_Release(&adapter->factory->IDXGIFactory4_iface);
IWineDXGIFactory_Release(&adapter->factory->IWineDXGIFactory_iface);
heap_free(adapter);
}
......@@ -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);
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,
......@@ -351,7 +351,7 @@ static void dxgi_adapter_init(struct dxgi_adapter *adapter, struct dxgi_factory
wined3d_private_store_init(&adapter->private_store);
adapter->ordinal = ordinal;
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)
......
......@@ -373,7 +373,7 @@ HRESULT dxgi_device_init(struct dxgi_device *device, struct dxgi_device_layer *l
void *layer_base;
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");
return E_FAIL;
......
......@@ -107,7 +107,7 @@ HRESULT dxgi_set_private_data_interface(struct wined3d_private_store *store,
/* IDXGIFactory */
struct dxgi_factory
{
IDXGIFactory4 IDXGIFactory4_iface;
IWineDXGIFactory IWineDXGIFactory_iface;
LONG refcount;
struct wined3d_private_store private_store;
struct wined3d *wined3d;
......@@ -117,7 +117,7 @@ struct dxgi_factory
HRESULT dxgi_factory_create(REFIID riid, void **factory, BOOL extended) 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 */
struct dxgi_device
......
......@@ -64,6 +64,8 @@ static HRESULT check_interface_(unsigned int line, void *iface, REFIID iid,
"Got hr %#x, expected %#x.\n", hr, expected_hr);
if (SUCCEEDED(hr))
IUnknown_Release(out);
else
ok_(__FILE__, line)(!out, "Got unexpected pointer %p.\n", out);
return hr;
}
......@@ -2611,7 +2613,7 @@ static void test_create_factory(void)
check_interface(iface, &IID_IDXGIFactory3, TRUE, FALSE);
/* Not available on all Windows versions. */
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);
ok(!refcount, "Factory has %u references left.\n", refcount);
......
......@@ -65,6 +65,6 @@ interface IWineDXGIAdapter : IDXGIAdapter3
local,
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