mirror of
git://source.winehq.org/git/wine.git
synced 2024-10-31 19:49:50 +00:00
ddraw: Return a failure code in IDirectDrawSurfaceImpl::QueryInterface if IDirect3D7::CreateDevice fails.
This commit is contained in:
parent
4be9f0a79b
commit
d5c2a358b7
1 changed files with 8 additions and 3 deletions
|
@ -118,10 +118,15 @@ IDirectDrawSurfaceImpl_QueryInterface(IDirectDrawSurface7 *iface,
|
|||
/* Call into IDirect3D7 for creation */
|
||||
IDirect3D7_CreateDevice((IDirect3D7 *)&This->ddraw->IDirect3D7_vtbl, riid, (IDirectDrawSurface7 *)This, &d3d);
|
||||
|
||||
*obj = d3d ? (IDirect3DDevice *)&((IDirect3DDeviceImpl *)d3d)->IDirect3DDevice_vtbl : NULL;
|
||||
TRACE("(%p) Returning IDirect3DDevice interface at %p\n", This, *obj);
|
||||
if (d3d)
|
||||
{
|
||||
*obj = (IDirect3DDevice *)&((IDirect3DDeviceImpl *)d3d)->IDirect3DDevice_vtbl;
|
||||
TRACE("(%p) Returning IDirect3DDevice interface at %p\n", This, *obj);
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
return S_OK;
|
||||
WARN("Unable to create a IDirect3DDevice instance, returning E_NOINTERFACE\n");
|
||||
return E_NOINTERFACE;
|
||||
}
|
||||
else if (IsEqualGUID( &IID_IDirect3DTexture, riid ) ||
|
||||
IsEqualGUID( &IID_IDirect3DTexture2, riid ))
|
||||
|
|
Loading…
Reference in a new issue