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

This commit is contained in:
Stefan Dösinger 2007-03-27 17:41:25 +02:00 committed by Alexandre Julliard
parent 03e9e5b60d
commit 1d4a4b75bc
2 changed files with 9 additions and 0 deletions

View File

@ -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
*/

View File

@ -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