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

ddraw: When changing the back buffers also update the render target.

parent 03e9e5b6
......@@ -308,6 +308,11 @@ IDirect3DDeviceImpl_7_Release(IDirect3DDevice7 *iface)
/* Restore the render targets */
if(This->OffScreenTarget)
{
/* Set the device up to render to the front buffer since the back buffer will
* vanish soon.
*/
IWineD3DDevice_SetRenderTarget(This->wineD3DDevice, 0,
This->ddraw->d3d_target->WineD3DSurface);
/* This->target is the offscreen target.
* This->ddraw->d3d_target is the target used by DDraw
*/
......
......@@ -855,6 +855,10 @@ IDirect3DImpl_7_CreateDevice(IDirect3D7 *iface,
if(hr != D3D_OK)
ERR("(%p) Error %08x setting the front and back buffer\n", This, hr);
/* Render to the back buffer */
IWineD3DDevice_SetRenderTarget(This->wineD3DDevice, 0,
target->WineD3DSurface);
object->OffScreenTarget = TRUE;
}
else
......
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