wined3d: Clean up IWineD3DSurface::ReleaseDC.
This commit is contained in:
parent
511f9dfb2d
commit
515ee4e89b
|
@ -1490,6 +1490,27 @@ const char* filename)
|
|||
return WINED3D_OK;
|
||||
}
|
||||
|
||||
HRESULT WINAPI IWineGDISurfaceImpl_ReleaseDC(IWineD3DSurface *iface, HDC hDC) {
|
||||
IWineD3DSurfaceImpl *This = (IWineD3DSurfaceImpl *)iface;
|
||||
|
||||
TRACE("(%p)->(%p)\n",This,hDC);
|
||||
|
||||
if (!(This->Flags & SFLAG_DCINUSE))
|
||||
return WINED3DERR_INVALIDCALL;
|
||||
|
||||
if (This->hDC !=hDC) {
|
||||
WARN("Application tries to release an invalid DC(%p), surface dc is %p\n", hDC, This->hDC);
|
||||
return WINED3DERR_INVALIDCALL;
|
||||
}
|
||||
|
||||
/* we locked first, so unlock now */
|
||||
IWineD3DSurface_UnlockRect(iface);
|
||||
|
||||
This->Flags &= ~SFLAG_DCINUSE;
|
||||
|
||||
return WINED3D_OK;
|
||||
}
|
||||
|
||||
/*****************************************************************************
|
||||
* IWineD3DSurface::PrivateSetup, GDI version
|
||||
*
|
||||
|
@ -1641,7 +1662,7 @@ const IWineD3DSurfaceVtbl IWineGDISurface_Vtbl =
|
|||
IWineGDISurfaceImpl_LockRect,
|
||||
IWineGDISurfaceImpl_UnlockRect,
|
||||
IWineD3DSurfaceImpl_GetDC,
|
||||
IWineD3DSurfaceImpl_ReleaseDC,
|
||||
IWineGDISurfaceImpl_ReleaseDC,
|
||||
IWineGDISurfaceImpl_Flip,
|
||||
IWineGDISurfaceImpl_Blt,
|
||||
IWineD3DBaseSurfaceImpl_GetBltStatus,
|
||||
|
|
|
@ -1174,7 +1174,6 @@ ULONG WINAPI IWineD3DSurfaceImpl_Release(IWineD3DSurface *iface);
|
|||
HRESULT WINAPI IWineD3DSurfaceImpl_SetPixelFormat(IWineD3DSurface *iface, WINED3DFORMAT Format, BYTE *Surface, DWORD Size);
|
||||
const void *WINAPI IWineD3DSurfaceImpl_GetData(IWineD3DSurface *iface);
|
||||
HRESULT WINAPI IWineD3DSurfaceImpl_GetDC(IWineD3DSurface *iface, HDC *pHDC);
|
||||
HRESULT WINAPI IWineD3DSurfaceImpl_ReleaseDC(IWineD3DSurface *iface, HDC hDC);
|
||||
|
||||
HRESULT WINAPI IWineGDISurfaceImpl_Blt(IWineD3DSurface *iface, RECT *DestRect, IWineD3DSurface *SrcSurface, RECT *SrcRect, DWORD Flags, WINEDDBLTFX *DDBltFx, WINED3DTEXTUREFILTERTYPE Filter);
|
||||
HRESULT WINAPI IWineGDISurfaceImpl_BltFast(IWineD3DSurface *iface, DWORD dstx, DWORD dsty, IWineD3DSurface *Source, RECT *rsrc, DWORD trans);
|
||||
|
|
Loading…
Reference in New Issue