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

d3d11: Implement d3d11_class_linkage_GetDevice().

parent 613a7e78
......@@ -373,6 +373,7 @@ struct d3d11_class_linkage
LONG refcount;
struct wined3d_private_store private_store;
ID3D11Device *device;
};
HRESULT d3d11_class_linkage_create(struct d3d_device *device,
......
......@@ -2127,8 +2127,12 @@ static ULONG STDMETHODCALLTYPE d3d11_class_linkage_Release(ID3D11ClassLinkage *i
if (!refcount)
{
ID3D11Device *device = class_linkage->device;
wined3d_private_store_cleanup(&class_linkage->private_store);
HeapFree(GetProcessHeap(), 0, class_linkage);
ID3D11Device_Release(device);
}
return refcount;
......@@ -2137,7 +2141,11 @@ static ULONG STDMETHODCALLTYPE d3d11_class_linkage_Release(ID3D11ClassLinkage *i
static void STDMETHODCALLTYPE d3d11_class_linkage_GetDevice(ID3D11ClassLinkage *iface,
ID3D11Device **device)
{
FIXME("iface %p, device %p stub!\n", iface, device);
struct d3d11_class_linkage *class_linkage = impl_from_ID3D11ClassLinkage(iface);
TRACE("iface %p, device %p.\n", iface, device);
ID3D11Device_AddRef(*device = class_linkage->device);
}
static HRESULT STDMETHODCALLTYPE d3d11_class_linkage_GetPrivateData(ID3D11ClassLinkage *iface,
......@@ -2218,6 +2226,8 @@ HRESULT d3d11_class_linkage_create(struct d3d_device *device, struct d3d11_class
object->refcount = 1;
wined3d_private_store_init(&object->private_store);
ID3D11Device_AddRef(object->device = &device->ID3D11Device_iface);
TRACE("Created class linkage %p.\n", object);
*class_linkage = object;
......
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