[PATCH 8/9] quartz/vmr9: Use assignment instead of CopyRect

Michael Stefaniuc mstefani at winehq.org
Fri Dec 28 15:20:54 CST 2018


I'm assuming those methods will do argument validation with proper error
code should the RECTs be NULL. Needs tests of course. But that's the
reason I didn't replace those when I did my CopyRect() removals back in
the day.

Also we are in change freeze and pure janitorial work is kinda forbidden
during that; especially in the later rc versions.

bye
	michael

On 12/28/18 1:23 PM, Gabriel Ivăncescu wrote:
> Signed-off-by: Gabriel Ivăncescu <gabrielopcode at gmail.com>
> ---
>  dlls/quartz/vmr9.c | 8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/dlls/quartz/vmr9.c b/dlls/quartz/vmr9.c
> index 5aa9799..413638b 100644
> --- a/dlls/quartz/vmr9.c
> +++ b/dlls/quartz/vmr9.c
> @@ -582,7 +582,7 @@ static const BaseWindowFuncTable renderer_BaseWindowFuncTable = {
>  static HRESULT WINAPI VMR9_GetSourceRect(BaseControlVideo* This, RECT *pSourceRect)
>  {
>      struct quartz_vmr* pVMR9 = impl_from_BaseControlVideo(This);
> -    CopyRect(pSourceRect,&pVMR9->source_rect);
> +    if (pSourceRect) *pSourceRect = pVMR9->source_rect;
>      return S_OK;
>  }
>  
> @@ -648,7 +648,7 @@ static HRESULT WINAPI VMR9_GetStaticImage(BaseControlVideo* This, LONG *pBufferS
>  static HRESULT WINAPI VMR9_GetTargetRect(BaseControlVideo* This, RECT *pTargetRect)
>  {
>      struct quartz_vmr* pVMR9 = impl_from_BaseControlVideo(This);
> -    CopyRect(pTargetRect,&pVMR9->target_rect);
> +    if (pTargetRect) *pTargetRect = pVMR9->target_rect;
>      return S_OK;
>  }
>  
> @@ -715,14 +715,14 @@ static HRESULT WINAPI VMR9_SetDefaultTargetRect(BaseControlVideo* This)
>  static HRESULT WINAPI VMR9_SetSourceRect(BaseControlVideo* This, RECT *pSourceRect)
>  {
>      struct quartz_vmr* pVMR9 = impl_from_BaseControlVideo(This);
> -    CopyRect(&pVMR9->source_rect,pSourceRect);
> +    if (pSourceRect) pVMR9->source_rect = *pSourceRect;
>      return S_OK;
>  }
>  
>  static HRESULT WINAPI VMR9_SetTargetRect(BaseControlVideo* This, RECT *pTargetRect)
>  {
>      struct quartz_vmr* pVMR9 = impl_from_BaseControlVideo(This);
> -    CopyRect(&pVMR9->target_rect,pTargetRect);
> +    if (pTargetRect) pVMR9->target_rect = *pTargetRect;
>      return S_OK;
>  }
>  
> 




More information about the wine-devel mailing list