ddraw: Store a WineD3DBaseTexture instead of a WineD3DTexture.

This commit is contained in:
Stefan Dösinger 2007-04-24 02:04:11 +02:00 committed by Alexandre Julliard
parent 0629946e65
commit 7ca369d9b6
4 changed files with 8 additions and 8 deletions

View File

@ -2406,7 +2406,7 @@ IDirectDrawImpl_CreateSurface(IDirectDraw7 *iface,
0, /* usage */
Format,
Pool,
&object->wineD3DTexture,
(IWineD3DTexture **) &object->wineD3DTexture,
0, /* SharedHandle */
(IUnknown *) ICOM_INTERFACE(object, IDirectDrawSurface7),
D3D7CB_CreateSurface );

View File

@ -227,7 +227,7 @@ struct IDirectDrawSurfaceImpl
/* Connections to other Objects */
IDirectDrawImpl *ddraw;
IWineD3DSurface *WineD3DSurface;
IWineD3DTexture *wineD3DTexture;
IWineD3DBaseTexture *wineD3DTexture;
/* This implementation handles attaching surfaces to other surfaces */
IDirectDrawSurfaceImpl *next_attached;

View File

@ -2295,7 +2295,7 @@ IDirect3DDeviceImpl_7_SetRenderState(IDirect3DDevice7 *iface,
IDirectDrawSurfaceImpl *surf = (IDirectDrawSurfaceImpl *) This->Handles[Value - 1].ptr;
return IWineD3DDevice_SetTexture(This->wineD3DDevice,
0,
(IWineD3DBaseTexture *) surf->wineD3DTexture);
surf->wineD3DTexture);
}
}
@ -3946,7 +3946,7 @@ IDirect3DDeviceImpl_7_SetTexture(IDirect3DDevice7 *iface,
/* Texture may be NULL here */
return IWineD3DDevice_SetTexture(This->wineD3DDevice,
Stage,
surf ? (IWineD3DBaseTexture * ) surf->wineD3DTexture : NULL);
surf ? surf->wineD3DTexture : NULL);
}
static HRESULT WINAPI

View File

@ -301,7 +301,7 @@ IDirectDrawSurfaceImpl_Release(IDirectDrawSurface7 *iface)
*/
if(This->wineD3DTexture)
{
IWineD3DTexture_Release(This->wineD3DTexture);
IWineD3DBaseTexture_Release(This->wineD3DTexture);
}
/* If it's the RenderTarget, destroy the d3ddevice */
else if( (ddraw->d3d_initialized) && (This == ddraw->d3d_target))
@ -1815,8 +1815,8 @@ IDirectDrawSurfaceImpl_SetLOD(IDirectDrawSurface7 *iface,
return DDERR_INVALIDOBJECT;
}
return IWineD3DTexture_SetLOD(This->wineD3DTexture,
MaxLOD);
return IWineD3DBaseTexture_SetLOD(This->wineD3DTexture,
MaxLOD);
}
/*****************************************************************************
@ -1846,7 +1846,7 @@ IDirectDrawSurfaceImpl_GetLOD(IDirectDrawSurface7 *iface,
if (!(This->surface_desc.ddsCaps.dwCaps2 & DDSCAPS2_TEXTUREMANAGE))
return DDERR_INVALIDOBJECT;
*MaxLOD = IWineD3DTexture_GetLOD(This->wineD3DTexture);
*MaxLOD = IWineD3DBaseTexture_GetLOD(This->wineD3DTexture);
return DD_OK;
}