[PATCH 3/7] ddraw: Make sure to activate / deactivate the light on D3DLIGHT_ACTIVE flag changes.

Sergey Isakov isakov-sl at bk.ru
Mon Mar 30 13:39:18 CDT 2015


Sorry, but seems current revision has no “flags” variable

On 30 марта 2015 г., at 21:18, Matteo Bruni <mbruni at codeweavers.com> wrote:

> ---
> dlls/ddraw/light.c | 6 +++++-
> 1 file changed, 5 insertions(+), 1 deletion(-)
> 
> diff --git a/dlls/ddraw/light.c b/dlls/ddraw/light.c
> index baaf6a3..c632c32 100644
> --- a/dlls/ddraw/light.c
> +++ b/dlls/ddraw/light.c
> @@ -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();
> -- 
> 2.0.5
> 
> 
> 




More information about the wine-devel mailing list