ddraw: Handle stateblocks in d3d_device7_SetLight().

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:
Zebediah Figura 2019-11-13 21:47:50 -06:00 committed by Alexandre Julliard
parent 0117ad6039
commit 0914a2f2af

View file

@ -5545,7 +5545,9 @@ static HRESULT d3d_device7_SetLight(IDirect3DDevice7 *iface, DWORD light_idx, D3
wined3d_mutex_lock();
/* Note: D3DLIGHT7 is compatible with struct wined3d_light. */
hr = wined3d_device_set_light(device->wined3d_device, light_idx, (struct wined3d_light *)light);
hr = wined3d_stateblock_set_light(device->update_state, light_idx, (const struct wined3d_light *)light);
if (SUCCEEDED(hr) && !device->recording)
hr = wined3d_device_set_light(device->wined3d_device, light_idx, (const struct wined3d_light *)light);
wined3d_mutex_unlock();
return hr_ddraw_from_wined3d(hr);