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

dxgi: Update to IDXGIFactory2.

parent e0c7d903
......@@ -69,7 +69,7 @@ static ULONG STDMETHODCALLTYPE dxgi_adapter_Release(IDXGIAdapter1 *iface)
if (!refcount)
{
wined3d_private_store_cleanup(&adapter->private_store);
IDXGIFactory1_Release(&adapter->factory->IDXGIFactory1_iface);
IDXGIFactory2_Release(&adapter->factory->IDXGIFactory2_iface);
HeapFree(GetProcessHeap(), 0, adapter);
}
......@@ -112,7 +112,7 @@ static HRESULT STDMETHODCALLTYPE dxgi_adapter_GetParent(IDXGIAdapter1 *iface, RE
TRACE("iface %p, iid %s, parent %p.\n", iface, debugstr_guid(iid), parent);
return IDXGIFactory1_QueryInterface(&adapter->factory->IDXGIFactory1_iface, iid, parent);
return IDXGIFactory2_QueryInterface(&adapter->factory->IDXGIFactory2_iface, iid, parent);
}
static HRESULT STDMETHODCALLTYPE dxgi_adapter_EnumOutputs(IDXGIAdapter1 *iface,
......@@ -273,7 +273,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;
IDXGIFactory1_AddRef(&adapter->factory->IDXGIFactory1_iface);
IDXGIFactory2_AddRef(&adapter->factory->IDXGIFactory2_iface);
}
HRESULT dxgi_adapter_create(struct dxgi_factory *factory, UINT ordinal, struct dxgi_adapter **adapter)
......
......@@ -374,7 +374,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_IDXGIFactory1((IDXGIFactory1 *)factory)))
if (!(dxgi_factory = unsafe_impl_from_IDXGIFactory2((IDXGIFactory2 *)factory)))
{
WARN("This is not the factory we're looking for.\n");
return E_FAIL;
......
......@@ -34,6 +34,7 @@
#ifdef DXGI_INIT_GUID
#include "initguid.h"
#endif
#include "dxgi1_6.h"
#include "wine/wined3d.h"
#include "wine/winedxgi.h"
......@@ -103,7 +104,7 @@ HRESULT dxgi_set_private_data_interface(struct wined3d_private_store *store,
/* IDXGIFactory */
struct dxgi_factory
{
IDXGIFactory1 IDXGIFactory1_iface;
IDXGIFactory2 IDXGIFactory2_iface;
LONG refcount;
struct wined3d_private_store private_store;
struct wined3d *wined3d;
......@@ -113,7 +114,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_IDXGIFactory1(IDXGIFactory1 *iface) DECLSPEC_HIDDEN;
struct dxgi_factory *unsafe_impl_from_IDXGIFactory2(IDXGIFactory2 *iface) DECLSPEC_HIDDEN;
/* IDXGIDevice */
struct dxgi_device
......
......@@ -2337,7 +2337,6 @@ static void test_create_factory(void)
iface = NULL;
hr = CreateDXGIFactory(&IID_IDXGIFactory2, (void **)&iface);
todo_wine
ok(hr == S_OK || broken(hr == E_NOINTERFACE) /* Not available on all Windows versions. */,
"Got unexpected hr %#x.\n", hr);
if (SUCCEEDED(hr))
......@@ -2378,7 +2377,6 @@ static void test_create_factory(void)
iface = NULL;
hr = pCreateDXGIFactory1(&IID_IDXGIFactory2, (void **)&iface);
todo_wine
ok(hr == S_OK || broken(hr == E_NOINTERFACE) /* Not available on all Windows versions. */,
"Got unexpected hr %#x.\n", hr);
if (SUCCEEDED(hr))
......
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