[PATCH 3/4] d3d8: Handle stateblocks in d3d8_device_SetLight().

Zebediah Figura z.figura12 at gmail.com
Wed Nov 13 21:47:49 CST 2019


Signed-off-by: Zebediah Figura <z.figura12 at gmail.com>
---
 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 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;
-- 
2.23.0




More information about the wine-devel mailing list