Henri Verbeet : d3d8: Properly retrieve an interface pointer in IDirect3DDevice8Impl_GetRenderTarget ().
Alexandre Julliard
julliard at winehq.org
Mon Apr 23 13:41:37 CDT 2012
Module: wine
Branch: master
Commit: 17b83cd2549f45501b6f6165811c580dfd6504c2
URL: http://source.winehq.org/git/wine.git/?a=commit;h=17b83cd2549f45501b6f6165811c580dfd6504c2
Author: Henri Verbeet <hverbeet at codeweavers.com>
Date: Sun Apr 22 22:47:40 2012 +0200
d3d8: Properly retrieve an interface pointer in IDirect3DDevice8Impl_GetRenderTarget().
---
dlls/d3d8/device.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/dlls/d3d8/device.c b/dlls/d3d8/device.c
index 0a0e35d..e10c83c 100644
--- a/dlls/d3d8/device.c
+++ b/dlls/d3d8/device.c
@@ -1139,6 +1139,7 @@ static HRESULT WINAPI IDirect3DDevice8Impl_GetRenderTarget(IDirect3DDevice8 *ifa
{
IDirect3DDevice8Impl *This = impl_from_IDirect3DDevice8(iface);
struct wined3d_surface *wined3d_surface;
+ IDirect3DSurface8Impl *surface_impl;
HRESULT hr;
TRACE("iface %p, render_target %p.\n", iface, ppRenderTarget);
@@ -1151,7 +1152,8 @@ static HRESULT WINAPI IDirect3DDevice8Impl_GetRenderTarget(IDirect3DDevice8 *ifa
hr = wined3d_device_get_render_target(This->wined3d_device, 0, &wined3d_surface);
if (SUCCEEDED(hr) && wined3d_surface)
{
- *ppRenderTarget = wined3d_surface_get_parent(wined3d_surface);
+ surface_impl = wined3d_surface_get_parent(wined3d_surface);
+ *ppRenderTarget = &surface_impl->IDirect3DSurface8_iface;
IDirect3DSurface8_AddRef(*ppRenderTarget);
wined3d_surface_decref(wined3d_surface);
}
More information about the wine-cvs
mailing list