ddraw: Handle stateblocks in d3d_device7_LightEnable().

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-15 09:46:53 -06:00 committed by Alexandre Julliard
parent 21d331e3c4
commit 0e9bda4fb4
1 changed files with 3 additions and 1 deletions

View File

@ -6431,7 +6431,9 @@ static HRESULT d3d_device7_LightEnable(IDirect3DDevice7 *iface, DWORD light_idx,
TRACE("iface %p, light_idx %u, enabled %#x.\n", iface, light_idx, enabled);
wined3d_mutex_lock();
hr = wined3d_device_set_light_enable(device->wined3d_device, light_idx, enabled);
hr = wined3d_stateblock_set_light_enable(device->update_state, light_idx, enabled);
if (SUCCEEDED(hr) && !device->recording)
hr = wined3d_device_set_light_enable(device->wined3d_device, light_idx, enabled);
wined3d_mutex_unlock();
return hr_ddraw_from_wined3d(hr);