wined3d: Track overlay surfaces in the overlayed surface.
This commit is contained in:
parent
b0c4673779
commit
dff3a42233
|
@ -660,6 +660,7 @@ static HRESULT WINAPI IWineD3DDeviceImpl_CreateSurface(IWineD3DDevice *iface, U
|
|||
object->currentDesc.MultiSampleType = MultiSample;
|
||||
object->currentDesc.MultiSampleQuality = MultisampleQuality;
|
||||
object->glDescription.level = Level;
|
||||
list_init(&object->overlays);
|
||||
|
||||
/* Flags */
|
||||
object->Flags = SFLAG_NORMCOORD; /* Default to normalized coords */
|
||||
|
|
|
@ -474,6 +474,10 @@ ULONG WINAPI IWineD3DSurfaceImpl_Release(IWineD3DSurface *iface) {
|
|||
if(iface == device->ddraw_primary)
|
||||
device->ddraw_primary = NULL;
|
||||
|
||||
if(This->overlay_dest) {
|
||||
list_remove(&This->overlay_entry);
|
||||
}
|
||||
|
||||
TRACE("(%p) Released\n", This);
|
||||
HeapFree(GetProcessHeap(), 0, This);
|
||||
|
||||
|
|
|
@ -450,9 +450,15 @@ HRESULT WINAPI IWineD3DBaseSurfaceImpl_UpdateOverlay(IWineD3DSurface *iface, REC
|
|||
This->overlay_destrect.bottom = Dst ? Dst->currentDesc.Height : 0;
|
||||
}
|
||||
|
||||
if(Flags & WINEDDOVER_SHOW) {
|
||||
This->overlay_dest = Dst;
|
||||
if(This->overlay_dest && (This->overlay_dest != Dst || Flags & WINEDDOVER_HIDE)) {
|
||||
list_remove(&This->overlay_entry);
|
||||
}
|
||||
|
||||
if(Flags & WINEDDOVER_SHOW) {
|
||||
if(This->overlay_dest != Dst) {
|
||||
This->overlay_dest = Dst;
|
||||
list_add_tail(&Dst->overlays, &This->overlay_entry);
|
||||
}
|
||||
} else if(Flags & WINEDDOVER_HIDE) {
|
||||
/* tests show that the rectangles are erased on hide */
|
||||
This->overlay_srcrect.left = 0; This->overlay_srcrect.top = 0;
|
||||
|
|
|
@ -160,6 +160,10 @@ ULONG WINAPI IWineGDISurfaceImpl_Release(IWineD3DSurface *iface) {
|
|||
if(iface == device->ddraw_primary)
|
||||
device->ddraw_primary = NULL;
|
||||
|
||||
if(This->overlay_dest) {
|
||||
list_remove(&This->overlay_entry);
|
||||
}
|
||||
|
||||
TRACE("(%p) Released\n", This);
|
||||
HeapFree(GetProcessHeap(), 0, This);
|
||||
|
||||
|
|
|
@ -1331,6 +1331,8 @@ struct IWineD3DSurfaceImpl
|
|||
RECT overlay_srcrect;
|
||||
RECT overlay_destrect;
|
||||
IWineD3DSurfaceImpl *overlay_dest;
|
||||
struct list overlays;
|
||||
struct list overlay_entry;
|
||||
};
|
||||
|
||||
extern const IWineD3DSurfaceVtbl IWineD3DSurface_Vtbl;
|
||||
|
|
Loading…
Reference in New Issue