Module: wine Branch: master Commit: 0117ad6039cd7b02c1b2e462e7f1e102dc0ea29a URL: https://source.winehq.org/git/wine.git/?a=commit;h=0117ad6039cd7b02c1b2e462e...
Author: Zebediah Figura z.figura12@gmail.com Date: Wed Nov 13 21:47:49 2019 -0600
d3d8: Handle stateblocks in d3d8_device_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
---
dlls/d3d8/device.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/dlls/d3d8/device.c b/dlls/d3d8/device.c index 00539fdd07..a7a08b3f80 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;