diff --git a/dlls/d3d8/device.c b/dlls/d3d8/device.c index 00539fdd07f..a7a08b3f809 100644 --- a/dlls/d3d8/device.c +++ b/dlls/d3d8/device.c @@ -1750,7 +1750,9 @@ static HRESULT WINAPI d3d8_device_SetLight(IDirect3DDevice8 *iface, DWORD index, /* Note: D3DLIGHT8 is compatible with struct wined3d_light. */ wined3d_mutex_lock(); - hr = wined3d_device_set_light(device->wined3d_device, index, (const struct wined3d_light *)light); + hr = wined3d_stateblock_set_light(device->update_state, index, (const struct wined3d_light *)light); + if (SUCCEEDED(hr) && !device->recording) + hr = wined3d_device_set_light(device->wined3d_device, index, (const struct wined3d_light *)light); wined3d_mutex_unlock(); return hr;