Moved lpClipper into common_directdrawsurface struct
Release old clipper on new set
This commit is contained in:
parent
29ebdb7690
commit
8b7c1906a7
|
@ -262,6 +262,10 @@ HRESULT WINAPI DirectDrawEnumerateExA(
|
||||||
/* For the moment, Wine does not support any 3D only accelerators */
|
/* For the moment, Wine does not support any 3D only accelerators */
|
||||||
return DD_OK;
|
return DD_OK;
|
||||||
}
|
}
|
||||||
|
if (dwFlags == DDENUM_NONDISPLAYDEVICES) {
|
||||||
|
/* For the moment, Wine does not support any attached secondary devices */
|
||||||
|
return DD_OK;
|
||||||
|
}
|
||||||
|
|
||||||
if (DDRAW_DGA_Available()) {
|
if (DDRAW_DGA_Available()) {
|
||||||
TRACE("Enumerating DGA interface\n");
|
TRACE("Enumerating DGA interface\n");
|
||||||
|
@ -1488,9 +1492,8 @@ static ULONG WINAPI DGA_IDirectDrawSurface4Impl_Release(LPDIRECTDRAWSURFACE4 ifa
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Free the clipper if attached to this surface */
|
/* Free the clipper if attached to this surface */
|
||||||
if( This->lpClipper ) {
|
if( This->s.lpClipper )
|
||||||
IDirectDrawClipper_Release(This->lpClipper);
|
IDirectDrawClipper_Release(This->s.lpClipper);
|
||||||
}
|
|
||||||
|
|
||||||
HeapFree(GetProcessHeap(),0,This);
|
HeapFree(GetProcessHeap(),0,This);
|
||||||
return S_OK;
|
return S_OK;
|
||||||
|
@ -1557,9 +1560,8 @@ static ULONG WINAPI Xlib_IDirectDrawSurface4Impl_Release(LPDIRECTDRAWSURFACE4 if
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Free the clipper if present */
|
/* Free the clipper if present */
|
||||||
if( This->lpClipper ) {
|
if( This->s.lpClipper )
|
||||||
IDirectDrawClipper_Release(This->lpClipper);
|
IDirectDrawClipper_Release(This->lpClipper);
|
||||||
}
|
|
||||||
|
|
||||||
HeapFree(GetProcessHeap(),0,This);
|
HeapFree(GetProcessHeap(),0,This);
|
||||||
return S_OK;
|
return S_OK;
|
||||||
|
@ -1641,12 +1643,11 @@ static HRESULT WINAPI IDirectDrawSurface4Impl_SetClipper(
|
||||||
LPDIRECTDRAWSURFACE4 iface,LPDIRECTDRAWCLIPPER lpClipper
|
LPDIRECTDRAWSURFACE4 iface,LPDIRECTDRAWCLIPPER lpClipper
|
||||||
) {
|
) {
|
||||||
ICOM_THIS(IDirectDrawSurface4Impl,iface);
|
ICOM_THIS(IDirectDrawSurface4Impl,iface);
|
||||||
|
|
||||||
TRACE("(%p)->(%p)!\n",This,lpClipper);
|
TRACE("(%p)->(%p)!\n",This,lpClipper);
|
||||||
|
|
||||||
This->lpClipper = lpClipper;
|
IDirectDrawClipper_Release( This->s.lpClipper );
|
||||||
|
This->s.lpClipper = lpClipper;
|
||||||
IDirectDrawClipper_AddRef( lpClipper ); /* Add the reference to it */
|
IDirectDrawClipper_AddRef( lpClipper ); /* Add the reference to it */
|
||||||
|
|
||||||
return DD_OK;
|
return DD_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2408,14 +2409,12 @@ static HRESULT WINAPI IDirectDrawClipperImpl_SetHwnd(
|
||||||
ICOM_THIS(IDirectDrawClipperImpl,iface);
|
ICOM_THIS(IDirectDrawClipperImpl,iface);
|
||||||
|
|
||||||
TRACE("(%p)->SetHwnd(0x%08lx,0x%08lx)\n",This,dwFlags,(DWORD)hWnd);
|
TRACE("(%p)->SetHwnd(0x%08lx,0x%08lx)\n",This,dwFlags,(DWORD)hWnd);
|
||||||
|
if( dwFlags ) {
|
||||||
if( dwFlags )
|
FIXME("dwFlags = 0x%08lx, not supported.\n",dwFlags);
|
||||||
{
|
|
||||||
return DDERR_INVALIDPARAMS;
|
return DDERR_INVALIDPARAMS;
|
||||||
}
|
}
|
||||||
|
|
||||||
This->hWnd = hWnd;
|
This->hWnd = hWnd;
|
||||||
|
|
||||||
return DD_OK;
|
return DD_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3088,7 +3087,7 @@ static HRESULT WINAPI DGA_IDirectDraw2Impl_CreateSurface(
|
||||||
(*ilpdsf)->s.ddraw = This;
|
(*ilpdsf)->s.ddraw = This;
|
||||||
(*ilpdsf)->s.palette = NULL;
|
(*ilpdsf)->s.palette = NULL;
|
||||||
(*ilpdsf)->t.dga.fb_height = -1; /* This is to have non-on screen surfaces freed */
|
(*ilpdsf)->t.dga.fb_height = -1; /* This is to have non-on screen surfaces freed */
|
||||||
(*ilpdsf)->lpClipper = NULL;
|
(*ilpdsf)->s.lpClipper = NULL;
|
||||||
|
|
||||||
/* Copy the surface description */
|
/* Copy the surface description */
|
||||||
(*ilpdsf)->s.surface_desc = *lpddsd;
|
(*ilpdsf)->s.surface_desc = *lpddsd;
|
||||||
|
@ -3355,7 +3354,7 @@ static HRESULT WINAPI Xlib_IDirectDraw2Impl_CreateSurface(
|
||||||
ICOM_VTBL(*ilpdsf) = (ICOM_VTABLE(IDirectDrawSurface)*)&xlib_dds4vt;
|
ICOM_VTBL(*ilpdsf) = (ICOM_VTABLE(IDirectDrawSurface)*)&xlib_dds4vt;
|
||||||
(*ilpdsf)->s.palette = NULL;
|
(*ilpdsf)->s.palette = NULL;
|
||||||
(*ilpdsf)->t.xlib.image = NULL; /* This is for off-screen buffers */
|
(*ilpdsf)->t.xlib.image = NULL; /* This is for off-screen buffers */
|
||||||
(*ilpdsf)->lpClipper = NULL;
|
(*ilpdsf)->s.lpClipper = NULL;
|
||||||
|
|
||||||
/* Copy the surface description */
|
/* Copy the surface description */
|
||||||
(*ilpdsf)->s.surface_desc = *lpddsd;
|
(*ilpdsf)->s.surface_desc = *lpddsd;
|
||||||
|
|
|
@ -169,6 +169,8 @@ struct _common_directdrawsurface
|
||||||
|
|
||||||
/* Storage for attached device (void * as it can be either a Device or a Device2) */
|
/* Storage for attached device (void * as it can be either a Device or a Device2) */
|
||||||
void *d3d_device;
|
void *d3d_device;
|
||||||
|
|
||||||
|
LPDIRECTDRAWCLIPPER lpClipper;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct _dga_directdrawsurface
|
struct _dga_directdrawsurface
|
||||||
|
@ -195,7 +197,6 @@ struct IDirectDrawSurfaceImpl
|
||||||
struct _dga_directdrawsurface dga;
|
struct _dga_directdrawsurface dga;
|
||||||
struct _xlib_directdrawsurface xlib;
|
struct _xlib_directdrawsurface xlib;
|
||||||
} t;
|
} t;
|
||||||
LPDIRECTDRAWCLIPPER lpClipper;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
|
|
Loading…
Reference in New Issue