mirror of
git://source.winehq.org/git/wine.git
synced 2024-11-05 18:01:34 +00:00
d3d8: Forbid capturing a stateblock while recording.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com> Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
d63e1bc9ab
commit
2e01e46aeb
2 changed files with 7 additions and 1 deletions
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue