Commit e8aba715 authored by Matteo Bruni's avatar Matteo Bruni Committed by Alexandre Julliard

ddraw: Make sure to activate / deactivate the light on D3DLIGHT_ACTIVE flag changes.

parent b41a3ad2
......@@ -201,7 +201,11 @@ static HRESULT WINAPI d3d_light_SetLight(IDirect3DLight *iface, D3DLIGHT *data)
wined3d_mutex_lock();
memcpy(&light->light, data, sizeof(D3DLIGHT));
if (flags & D3DLIGHT_ACTIVE)
if (!(light->light.dwFlags & D3DLIGHT_ACTIVE) && flags & D3DLIGHT_ACTIVE)
light_activate(light);
else if (light->light.dwFlags & D3DLIGHT_ACTIVE && !(flags & D3DLIGHT_ACTIVE))
light_deactivate(light);
else if (flags & D3DLIGHT_ACTIVE)
light_update(light);
light->light.dwFlags = flags;
wined3d_mutex_unlock();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment