Commit c1bbab7c authored by Stefan Dösinger's avatar Stefan Dösinger Committed by Alexandre Julliard

ddraw: Send the ddraw output to the clipper window, if any.

parent 3d49e8cd
......@@ -3254,12 +3254,12 @@ IDirectDrawImpl_AttachD3DDevice(IDirectDrawImpl *This,
ShowWindow(window, SW_HIDE); /* Just to be sure */
WARN("(%p) No window for the Direct3DDevice, created a hidden window. HWND=%p\n", This, window);
This->d3d_window = window;
}
else
{
TRACE("(%p) Using existing window %p for Direct3D rendering\n", This, window);
}
This->d3d_window = window;
/* Store the future Render Target surface */
This->d3d_target = primary;
......
......@@ -2210,6 +2210,7 @@ IDirectDrawSurfaceImpl_SetClipper(IDirectDrawSurface7 *iface,
{
ICOM_THIS_FROM(IDirectDrawSurfaceImpl, IDirectDrawSurface7, iface);
IDirectDrawClipperImpl *oldClipper = This->clipper;
HWND clipWindow;
HRESULT hr;
TRACE("(%p)->(%p)\n",This,Clipper);
......@@ -2228,6 +2229,22 @@ IDirectDrawSurfaceImpl_SetClipper(IDirectDrawSurface7 *iface,
IDirectDrawClipper_Release(ICOM_INTERFACE(oldClipper, IDirectDrawClipper));
hr = IWineD3DSurface_SetClipper(This->WineD3DSurface, This->clipper ? This->clipper->wineD3DClipper : NULL);
if(This->wineD3DSwapChain) {
clipWindow = NULL;
if(Clipper) {
IDirectDrawClipper_GetHWnd(Clipper, &clipWindow);
}
if(clipWindow) {
IWineD3DSwapChain_SetDestWindowOverride(This->wineD3DSwapChain,
clipWindow);
} else {
IWineD3DSwapChain_SetDestWindowOverride(This->wineD3DSwapChain,
This->ddraw->d3d_window);
}
}
LeaveCriticalSection(&ddraw_cs);
return hr;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment