Commit 8bc7139b authored by Paul Gofman's avatar Paul Gofman Committed by Alexandre Julliard

ddraw: Fix setting current viewport for ddraw1.

parent db201072
......@@ -555,7 +555,7 @@ struct d3d_execute_buffer *unsafe_impl_from_IDirect3DExecuteBuffer(IDirect3DExec
/* The execute function */
HRESULT d3d_execute_buffer_execute(struct d3d_execute_buffer *execute_buffer,
struct d3d_device *device, struct d3d_viewport *viewport) DECLSPEC_HIDDEN;
struct d3d_device *device) DECLSPEC_HIDDEN;
/*****************************************************************************
* IDirect3DVertexBuffer
......
......@@ -712,9 +712,13 @@ static HRESULT WINAPI d3d_device1_Execute(IDirect3DDevice *iface,
if(!buffer)
return DDERR_INVALIDPARAMS;
if (FAILED(hr = IDirect3DDevice3_SetCurrentViewport
(&device->IDirect3DDevice3_iface, &viewport_impl->IDirect3DViewport3_iface)))
return hr;
/* Execute... */
wined3d_mutex_lock();
hr = d3d_execute_buffer_execute(buffer, device, viewport_impl);
hr = d3d_execute_buffer_execute(buffer, device);
wined3d_mutex_unlock();
return hr;
......
......@@ -48,8 +48,7 @@ static void _dump_D3DEXECUTEBUFFERDESC(const D3DEXECUTEBUFFERDESC *lpDesc) {
TRACE("lpData : %p\n", lpDesc->lpData);
}
HRESULT d3d_execute_buffer_execute(struct d3d_execute_buffer *buffer,
struct d3d_device *device, struct d3d_viewport *viewport)
HRESULT d3d_execute_buffer_execute(struct d3d_execute_buffer *buffer, struct d3d_device *device)
{
DWORD is = buffer->data.dwInstructionOffset;
char *instr = (char *)buffer->desc.lpData + is;
......@@ -58,16 +57,6 @@ HRESULT d3d_execute_buffer_execute(struct d3d_execute_buffer *buffer,
struct wined3d_box box = {0};
HRESULT hr;
if (viewport->active_device != device)
{
WARN("Viewport %p active device is %p.\n",
viewport, viewport->active_device);
return DDERR_INVALIDPARAMS;
}
/* Activate the viewport */
viewport_activate(viewport, FALSE);
TRACE("ExecuteData :\n");
if (TRACE_ON(ddraw))
_dump_executedata(&(buffer->data));
......
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