wined3d: Implement IWineD3DSurface::IsLost and Restore.

This commit is contained in:
Stefan Dösinger 2006-05-09 18:47:28 +02:00 committed by Alexandre Julliard
parent 10ff0d8184
commit 08dc9e003d
2 changed files with 11 additions and 4 deletions

View File

@ -1698,13 +1698,19 @@ HRESULT WINAPI IWineD3DSurfaceImpl_GetFlipStatus(IWineD3DSurface *iface, DWORD F
}
HRESULT WINAPI IWineD3DSurfaceImpl_IsLost(IWineD3DSurface *iface) {
FIXME("This is unimplemented for now(d3d7 merge)\n");
return WINED3DERR_INVALIDCALL;
IWineD3DSurfaceImpl *This = (IWineD3DSurfaceImpl *) iface;
TRACE("(%p)\n", This);
return This->Flags & SFLAG_LOST ? DDERR_SURFACELOST : WINED3D_OK;
}
HRESULT WINAPI IWineD3DSurfaceImpl_Restore(IWineD3DSurface *iface) {
FIXME("This is unimplemented for now(d3d7 merge)\n");
return WINED3DERR_INVALIDCALL;
IWineD3DSurfaceImpl *This = (IWineD3DSurfaceImpl *) iface;
TRACE("(%p)\n", This);
/* So far we don't lose anything :) */
This->Flags &= ~SFLAG_LOST;
return WINED3D_OK;
}
HRESULT WINAPI IWineD3DSurfaceImpl_BltFast(IWineD3DSurface *iface, DWORD dstx, DWORD dsty, IWineD3DSurface *Source, RECT *rsrc, DWORD trans) {

View File

@ -855,6 +855,7 @@ extern const IWineD3DSurfaceVtbl IWineD3DSurface_Vtbl;
#define SFLAG_DYNCHANGE 0x1800 /* Surface contents are changed very often, implies DYNLOCK */
#define SFLAG_DCINUSE 0x2000 /* Set between GetDC and ReleaseDC calls */
#define SFLAG_NEWDC 0x4000 /* To inform LockRect about a new dc */
#define SFLAG_LOST 0x8000 /* Surface lost flag for DDraw */
/* In some conditions the surface memory must not be freed:
* SFLAG_OVERSIZE: Not all data can be kept in GL