Commit 7dd4f439 authored by Henri Verbeet's avatar Henri Verbeet Committed by Alexandre Julliard

ddraw: The texture interfaces can't be queried from version 7 surfaces.

parent 8481625f
......@@ -222,21 +222,21 @@ static HRESULT WINAPI ddraw_surface7_QueryInterface(IDirectDrawSurface7 *iface,
return E_NOINTERFACE;
}
if (IsEqualGUID( &IID_IDirect3DTexture2, riid)
|| IsEqualGUID(&IID_IDirect3DTexture, riid))
if (This->version != 7)
{
if (IsEqualGUID( &IID_IDirect3DTexture, riid ))
if (IsEqualGUID(&IID_IDirect3DTexture2, riid))
{
*obj = &This->IDirect3DTexture_iface;
TRACE(" returning Direct3DTexture interface at %p.\n", *obj);
IDirect3DTexture2_AddRef(&This->IDirect3DTexture2_iface);
*obj = &This->IDirect3DTexture2_iface;
return S_OK;
}
else
if (IsEqualGUID( &IID_IDirect3DTexture, riid ))
{
*obj = &This->IDirect3DTexture2_iface;
TRACE(" returning Direct3DTexture2 interface at %p.\n", *obj);
IDirect3DTexture2_AddRef(&This->IDirect3DTexture_iface);
*obj = &This->IDirect3DTexture_iface;
return S_OK;
}
IUnknown_AddRef( (IUnknown *) *obj);
return S_OK;
}
WARN("%s not implemented, returning E_NOINTERFACE.\n", debugstr_guid(riid));
......
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