Henri Verbeet : ddraw: Properly retrieve an interface pointer in ddraw7_GetSurfaceFromDC().

Alexandre Julliard julliard at winehq.org
Tue Apr 10 13:52:33 CDT 2012


Module: wine
Branch: master
Commit: 9cb7ca004a3d9a87466485fcbc2e3df3b71fac93
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=9cb7ca004a3d9a87466485fcbc2e3df3b71fac93

Author: Henri Verbeet <hverbeet at codeweavers.com>
Date:   Mon Apr  9 20:43:38 2012 +0200

ddraw: Properly retrieve an interface pointer in ddraw7_GetSurfaceFromDC().

---

 dlls/ddraw/ddraw.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/dlls/ddraw/ddraw.c b/dlls/ddraw/ddraw.c
index 2ef51da..a777d35 100644
--- a/dlls/ddraw/ddraw.c
+++ b/dlls/ddraw/ddraw.c
@@ -2471,6 +2471,7 @@ static HRESULT WINAPI ddraw7_GetSurfaceFromDC(IDirectDraw7 *iface, HDC hdc,
 {
     struct ddraw *ddraw = impl_from_IDirectDraw7(iface);
     struct wined3d_surface *wined3d_surface;
+    struct ddraw_surface *surface_impl;
     HRESULT hr;
 
     TRACE("iface %p, dc %p, surface %p.\n", iface, hdc, Surface);
@@ -2485,7 +2486,8 @@ static HRESULT WINAPI ddraw7_GetSurfaceFromDC(IDirectDraw7 *iface, HDC hdc,
         return DDERR_NOTFOUND;
     }
 
-    *Surface = wined3d_surface_get_parent(wined3d_surface);
+    surface_impl = wined3d_surface_get_parent(wined3d_surface);
+    *Surface = &surface_impl->IDirectDrawSurface7_iface;
     IDirectDrawSurface7_AddRef(*Surface);
     TRACE("Returning surface %p.\n", Surface);
     return DD_OK;




More information about the wine-cvs mailing list