Commit 2e01e46a authored by Zebediah Figura's avatar Zebediah Figura Committed by Alexandre Julliard

d3d8: Forbid capturing a stateblock while recording.

parent d63e1bc9
......@@ -1964,6 +1964,12 @@ static HRESULT WINAPI d3d8_device_CaptureStateBlock(IDirect3DDevice8 *iface, DWO
TRACE("iface %p, token %#x.\n", iface, token);
wined3d_mutex_lock();
if (device->recording)
{
wined3d_mutex_unlock();
WARN("Trying to capture stateblock while recording, returning D3DERR_INVALIDCALL.\n");
return D3DERR_INVALIDCALL;
}
stateblock = d3d8_get_object(&device->handle_table, token - 1, D3D8_HANDLE_SB);
if (!stateblock)
{
......
......@@ -7280,7 +7280,7 @@ static void test_begin_end_state_block(void)
ok(hr == D3DERR_INVALIDCALL, "Got unexpected hr %#x.\n", hr);
hr = IDirect3DDevice8_CaptureStateBlock(device, stateblock);
todo_wine ok(hr == D3DERR_INVALIDCALL, "Got unexpected hr %#x.\n", hr);
ok(hr == D3DERR_INVALIDCALL, "Got unexpected hr %#x.\n", hr);
hr = IDirect3DDevice8_CreateStateBlock(device, D3DSBT_ALL, &stateblock2);
todo_wine ok(hr == D3DERR_INVALIDCALL, "Got unexpected hr %#x.\n", 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