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

This commit is contained in:
Henri Verbeet 2012-03-30 01:08:36 +02:00 committed by Alexandre Julliard
parent a623075612
commit f7719a89ad
1 changed files with 3 additions and 3 deletions

View File

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