evr/presenter: Remove scaling by zoom rectangle.

Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Nikolay Sivov 2021-10-26 19:58:30 +03:00 committed by Alexandre Julliard
parent c2297eb4f3
commit a1c057c9a7
1 changed files with 1 additions and 16 deletions

View File

@ -460,21 +460,6 @@ static HRESULT video_presenter_get_sample_surface(IMFSample *sample, IDirect3DSu
return hr;
}
static void scale_rect(RECT *rect, unsigned int width, unsigned int height, const MFVideoNormalizedRect *scale)
{
if (rect->left == 0.0f && rect->top == 0.0f && rect->right == 1.0f && rect->bottom == 1.0f)
{
SetRect(rect, 0, 0, width, height);
}
else
{
rect->left = width * scale->left;
rect->right = width * scale->right;
rect->top = height * scale->top;
rect->bottom = height * scale->bottom;
}
}
static void video_presenter_sample_present(struct video_presenter *presenter, IMFSample *sample)
{
IDirect3DSurface9 *surface, *backbuffer;
@ -503,7 +488,7 @@ static void video_presenter_sample_present(struct video_presenter *presenter, IM
IDirect3DDevice9_StretchRect(device, surface, NULL, backbuffer, NULL, D3DTEXF_POINT);
IDirect3DSurface9_GetDesc(surface, &desc);
scale_rect(&src, desc.Width, desc.Height, &presenter->src_rect);
SetRect(&src, 0, 0, desc.Width, desc.Height);
IDirect3DSurface9_GetDesc(backbuffer, &desc);
SetRect(&dst, 0, 0, desc.Width, desc.Height);