Commit f7719a89 authored by Henri Verbeet's avatar Henri Verbeet Committed by Alexandre Julliard

ddraw: Querying IUnknown for a surface should return the IDirectDrawSurface interface.

parent a6230756
...@@ -142,8 +142,7 @@ static HRESULT WINAPI ddraw_surface7_QueryInterface(IDirectDrawSurface7 *iface, ...@@ -142,8 +142,7 @@ static HRESULT WINAPI ddraw_surface7_QueryInterface(IDirectDrawSurface7 *iface,
if(!riid) if(!riid)
return DDERR_INVALIDPARAMS; return DDERR_INVALIDPARAMS;
if (IsEqualGUID(riid, &IID_IUnknown) if (IsEqualGUID(riid, &IID_IDirectDrawSurface7))
|| IsEqualGUID(riid, &IID_IDirectDrawSurface7) )
{ {
IDirectDrawSurface7_AddRef(iface); IDirectDrawSurface7_AddRef(iface);
*obj = iface; *obj = iface;
...@@ -175,7 +174,8 @@ static HRESULT WINAPI ddraw_surface7_QueryInterface(IDirectDrawSurface7 *iface, ...@@ -175,7 +174,8 @@ static HRESULT WINAPI ddraw_surface7_QueryInterface(IDirectDrawSurface7 *iface,
return S_OK; return S_OK;
} }
if (IsEqualGUID(riid, &IID_IDirectDrawSurface)) if (IsEqualGUID(riid, &IID_IDirectDrawSurface)
|| IsEqualGUID(riid, &IID_IUnknown))
{ {
IDirectDrawSurface_AddRef(&This->IDirectDrawSurface_iface); IDirectDrawSurface_AddRef(&This->IDirectDrawSurface_iface);
*obj = &This->IDirectDrawSurface_iface; *obj = &This->IDirectDrawSurface_iface;
......
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