Commit 6ae96807 authored by Henri Verbeet's avatar Henri Verbeet Committed by Alexandre Julliard

ddrawex: Directly return the ddraw surface in IDirectDraw4Impl_GetSurfaceFromDC().

parent 7bfe6c43
...@@ -1320,20 +1320,9 @@ IDirectDraw4Impl_GetSurfaceFromDC(IDirectDraw4 *iface, ...@@ -1320,20 +1320,9 @@ IDirectDraw4Impl_GetSurfaceFromDC(IDirectDraw4 *iface,
IDirectDrawSurface4 **Surface) IDirectDrawSurface4 **Surface)
{ {
IDirectDrawImpl *This = impl_from_dd4(iface); IDirectDrawImpl *This = impl_from_dd4(iface);
IDirectDrawSurface4 *inner;
HRESULT hr; HRESULT hr;
TRACE("(%p)->(%p, %p)\n", This, hdc, Surface); TRACE("(%p)->(%p, %p)\n", This, hdc, Surface);
hr = IDirectDraw4_GetSurfaceFromDC(This->parent,hdc, &inner); hr = IDirectDraw4_GetSurfaceFromDC(This->parent,hdc, Surface);
if(SUCCEEDED(hr))
{
*Surface = dds_get_outer(inner);
IDirectDrawSurface4_AddRef(*Surface);
IDirectDrawSurface4_Release(inner);
}
else
{
*Surface = NULL;
}
return hr; return hr;
} }
......
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