[PATCH v4 3/5] d2d1: Implement d2d_effect_SetInputCount().

Henri Verbeet hverbeet at gmail.com
Mon Aug 9 11:52:05 CDT 2021


On Sun, 8 Aug 2021 at 06:41, Ziqing Hui <zhui at codeweavers.com> wrote:
> diff --git a/dlls/d2d1/d2d1_private.h b/dlls/d2d1/d2d1_private.h
> index 88c712cf51c..1391c24b053 100644
> --- a/dlls/d2d1/d2d1_private.h
> +++ b/dlls/d2d1/d2d1_private.h
> @@ -575,6 +575,8 @@ struct d2d_effect
>      ID2D1Image **inputs;
>      size_t inputs_size;
>      size_t input_count;
> +    UINT32 min_inputs;
> +    UINT32 max_inputs;
>  };
>
If we take it one step further, we can just store a struct
d2d_effect_info pointer in the d2d_effect structure.

>  static HRESULT STDMETHODCALLTYPE d2d_effect_SetInputCount(ID2D1Effect *iface, UINT32 count)
>  {
> -    FIXME("iface %p, count %u stub!\n", iface, count);
> +    struct d2d_effect *effect = impl_from_ID2D1Effect(iface);
> +    unsigned int i;
>
> -    return E_NOTIMPL;
> +    TRACE("iface %p, count %u.\n", iface, count);
> +
> +    if (count < effect->min_inputs || count > effect->max_inputs)
> +        return E_INVALIDARG;

And then e.g. the line about would become "if (count <
effect->info->min_inputs || count > effect->info->max_inputs)"



More information about the wine-devel mailing list