diff --git a/dlls/ddraw/device.c b/dlls/ddraw/device.c index e2643e6589d..55a9c6b6a18 100644 --- a/dlls/ddraw/device.c +++ b/dlls/ddraw/device.c @@ -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);