mirror of
https://github.com/reactos/wine.git
synced 2024-11-26 13:10:28 +00:00
ddrawex: Directly return the ddraw surface in IDirectDraw4Impl_GetSurfaceFromDC().
This commit is contained in:
parent
7bfe6c4308
commit
6ae96807c0
@ -1320,20 +1320,9 @@ IDirectDraw4Impl_GetSurfaceFromDC(IDirectDraw4 *iface,
|
||||
IDirectDrawSurface4 **Surface)
|
||||
{
|
||||
IDirectDrawImpl *This = impl_from_dd4(iface);
|
||||
IDirectDrawSurface4 *inner;
|
||||
HRESULT hr;
|
||||
TRACE("(%p)->(%p, %p)\n", This, hdc, Surface);
|
||||
hr = IDirectDraw4_GetSurfaceFromDC(This->parent,hdc, &inner);
|
||||
if(SUCCEEDED(hr))
|
||||
{
|
||||
*Surface = dds_get_outer(inner);
|
||||
IDirectDrawSurface4_AddRef(*Surface);
|
||||
IDirectDrawSurface4_Release(inner);
|
||||
}
|
||||
else
|
||||
{
|
||||
*Surface = NULL;
|
||||
}
|
||||
hr = IDirectDraw4_GetSurfaceFromDC(This->parent,hdc, Surface);
|
||||
|
||||
return hr;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user