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

dxgi: Implement IDXGIAdapter3.

parent 7e72c2d4
......@@ -85,7 +85,7 @@ static ULONG STDMETHODCALLTYPE dxgi_device_Release(IWineDXGIDevice *iface)
wined3d_device_uninit_3d(device->wined3d_device);
wined3d_device_decref(device->wined3d_device);
wined3d_mutex_unlock();
IDXGIAdapter1_Release(device->adapter);
IWineDXGIAdapter_Release(device->adapter);
wined3d_private_store_cleanup(&device->private_store);
HeapFree(GetProcessHeap(), 0, device);
}
......@@ -379,7 +379,7 @@ HRESULT dxgi_device_init(struct dxgi_device *device, struct dxgi_device_layer *l
return E_FAIL;
}
if (!(dxgi_adapter = unsafe_impl_from_IDXGIAdapter1((IDXGIAdapter1 *)adapter)))
if (!(dxgi_adapter = unsafe_impl_from_IDXGIAdapter(adapter)))
{
WARN("This is not the adapter we're looking for.\n");
return E_FAIL;
......@@ -452,8 +452,8 @@ HRESULT dxgi_device_init(struct dxgi_device *device, struct dxgi_device_layer *l
}
wined3d_mutex_unlock();
device->adapter = &dxgi_adapter->IDXGIAdapter1_iface;
IDXGIAdapter1_AddRef(device->adapter);
device->adapter = &dxgi_adapter->IWineDXGIAdapter_iface;
IWineDXGIAdapter_AddRef(device->adapter);
return S_OK;
}
......@@ -126,7 +126,7 @@ struct dxgi_device
LONG refcount;
struct wined3d_private_store private_store;
struct wined3d_device *wined3d_device;
IDXGIAdapter1 *adapter;
IWineDXGIAdapter *adapter;
};
HRESULT dxgi_device_init(struct dxgi_device *device, struct dxgi_device_layer *layer,
......@@ -147,7 +147,7 @@ HRESULT dxgi_output_create(struct dxgi_adapter *adapter, struct dxgi_output **ou
/* IDXGIAdapter */
struct dxgi_adapter
{
IDXGIAdapter1 IDXGIAdapter1_iface;
IWineDXGIAdapter IWineDXGIAdapter_iface;
LONG refcount;
struct wined3d_private_store private_store;
UINT ordinal;
......@@ -156,7 +156,7 @@ struct dxgi_adapter
HRESULT dxgi_adapter_create(struct dxgi_factory *factory, UINT ordinal,
struct dxgi_adapter **adapter) DECLSPEC_HIDDEN;
struct dxgi_adapter *unsafe_impl_from_IDXGIAdapter1(IDXGIAdapter1 *iface) DECLSPEC_HIDDEN;
struct dxgi_adapter *unsafe_impl_from_IDXGIAdapter(IDXGIAdapter *iface) DECLSPEC_HIDDEN;
/* IDXGISwapChain */
struct dxgi_swapchain
......
......@@ -155,7 +155,7 @@ static HRESULT STDMETHODCALLTYPE dxgi_factory_EnumAdapters1(IDXGIFactory4 *iface
return hr;
}
*adapter = &adapter_object->IDXGIAdapter1_iface;
*adapter = (IDXGIAdapter1 *)&adapter_object->IWineDXGIAdapter_iface;
TRACE("Returning adapter %p.\n", *adapter);
......
......@@ -80,7 +80,7 @@ static ULONG STDMETHODCALLTYPE dxgi_output_Release(IDXGIOutput *iface)
if (!refcount)
{
wined3d_private_store_cleanup(&output->private_store);
IDXGIAdapter1_Release(&output->adapter->IDXGIAdapter1_iface);
IWineDXGIAdapter_Release(&output->adapter->IWineDXGIAdapter_iface);
HeapFree(GetProcessHeap(), 0, output);
}
......@@ -126,7 +126,7 @@ static HRESULT STDMETHODCALLTYPE dxgi_output_GetParent(IDXGIOutput *iface,
TRACE("iface %p, riid %s, parent %p.\n", iface, debugstr_guid(riid), parent);
return IDXGIAdapter1_QueryInterface(&output->adapter->IDXGIAdapter1_iface, riid, parent);
return IWineDXGIAdapter_QueryInterface(&output->adapter->IWineDXGIAdapter_iface, riid, parent);
}
/* IDXGIOutput methods */
......@@ -365,7 +365,7 @@ static void dxgi_output_init(struct dxgi_output *output, struct dxgi_adapter *ad
output->refcount = 1;
wined3d_private_store_init(&output->private_store);
output->adapter = adapter;
IDXGIAdapter1_AddRef(&output->adapter->IDXGIAdapter1_iface);
IWineDXGIAdapter_AddRef(&output->adapter->IWineDXGIAdapter_iface);
}
HRESULT dxgi_output_create(struct dxgi_adapter *adapter, struct dxgi_output **output)
......
......@@ -665,7 +665,7 @@ HRESULT dxgi_swapchain_init(struct dxgi_swapchain *swapchain, struct dxgi_device
*/
if (!implicit)
{
if (FAILED(hr = IDXGIAdapter1_GetParent(device->adapter, &IID_IDXGIFactory,
if (FAILED(hr = IWineDXGIAdapter_GetParent(device->adapter, &IID_IDXGIFactory,
(void **)&swapchain->factory)))
{
WARN("Failed to get adapter parent, hr %#x.\n", hr);
......
......@@ -56,7 +56,7 @@ interface IWineDXGIDeviceParent : IUnknown
local,
uuid(17399d75-964e-4c03-99f8-9d4fd196dd62)
]
interface IWineDXGIAdapter : IDXGIAdapter1
interface IWineDXGIAdapter : IDXGIAdapter3
{
}
......
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