d3d8: Forbid applying 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
74b3f9e3af
commit
d63e1bc9ab
|
@ -1924,6 +1924,12 @@ static HRESULT WINAPI d3d8_device_ApplyStateBlock(IDirect3DDevice8 *iface, DWORD
|
|||
return D3D_OK;
|
||||
|
||||
wined3d_mutex_lock();
|
||||
if (device->recording)
|
||||
{
|
||||
wined3d_mutex_unlock();
|
||||
WARN("Trying to apply stateblock while recording, returning D3DERR_INVALIDCALL.\n");
|
||||
return D3DERR_INVALIDCALL;
|
||||
}
|
||||
stateblock = d3d8_get_object(&device->handle_table, token - 1, D3D8_HANDLE_SB);
|
||||
if (!stateblock)
|
||||
{
|
||||
|
|
|
@ -7277,7 +7277,7 @@ static void test_begin_end_state_block(void)
|
|||
ok(hr == D3DERR_INVALIDCALL, "Got unexpected hr %#x.\n", hr);
|
||||
|
||||
hr = IDirect3DDevice8_ApplyStateBlock(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_CaptureStateBlock(device, stateblock);
|
||||
todo_wine ok(hr == D3DERR_INVALIDCALL, "Got unexpected hr %#x.\n", hr);
|
||||
|
@ -7297,7 +7297,7 @@ static void test_begin_end_state_block(void)
|
|||
|
||||
hr = IDirect3DDevice8_GetRenderState(device, D3DRS_LIGHTING, &value);
|
||||
ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr);
|
||||
todo_wine ok(value == TRUE, "Got unexpected value %#x.\n", value);
|
||||
ok(value == TRUE, "Got unexpected value %#x.\n", value);
|
||||
|
||||
refcount = IDirect3DDevice8_Release(device);
|
||||
ok(!refcount, "Device has %u references left.\n", refcount);
|
||||
|
|
Loading…
Reference in New Issue