static HRESULT WINAPI d3d8_volume_GetDevice(IDirect3DVolume8 *iface, IDirect3DDevice8 **device) { struct d3d8_volume *volume = impl_from_IDirect3DVolume8(iface); TRACE("iface %p, device %p.\n", iface, device); return IDirect3DBaseTexture8_GetDevice(&volume->texture->IDirect3DBaseTexture8_iface, device); }
static HRESULT WINAPI d3d8_surface_GetDevice(IDirect3DSurface8 *iface, IDirect3DDevice8 **device) { struct d3d8_surface *surface = impl_from_IDirect3DSurface8(iface); TRACE("iface %p, device %p.\n", iface, device); if (surface->texture) return IDirect3DBaseTexture8_GetDevice(&surface->texture->IDirect3DBaseTexture8_iface, device); *device = surface->parent_device; IDirect3DDevice8_AddRef(*device); TRACE("Returning device %p.\n", *device); return D3D_OK; }