[vlc-commits] direct3d9: glconv: use visible size
Thomas Guillem
git at videolan.org
Tue Nov 14 13:37:12 CET 2017
vlc | branch: master | Thomas Guillem <thomas at gllm.fr> | Tue Nov 14 13:30:05 2017 +0100| [849fe102670350ffe2474af56734f6622a7bb854] | committer: Thomas Guillem
direct3d9: glconv: use visible size
This fixes the usual green line issue...
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=849fe102670350ffe2474af56734f6622a7bb854
---
modules/video_output/win32/direct3d9.c | 12 +++++++++---
1 file changed, 9 insertions(+), 3 deletions(-)
diff --git a/modules/video_output/win32/direct3d9.c b/modules/video_output/win32/direct3d9.c
index 82634eef1a..bada359642 100644
--- a/modules/video_output/win32/direct3d9.c
+++ b/modules/video_output/win32/direct3d9.c
@@ -2019,8 +2019,14 @@ GLConvUpdate(const opengl_tex_converter_t *tc, GLuint *textures,
return VLC_EGENERIC;
}
+ const RECT rect = {
+ .left = 0,
+ .top = 0,
+ .right = pic->format.i_visible_width,
+ .bottom = pic->format.i_visible_height
+ };
hr = IDirect3DDevice9Ex_StretchRect(priv->d3dctx.devex, picsys->surface,
- NULL, priv->dx_render, NULL, D3DTEXF_NONE);
+ &rect, priv->dx_render, NULL, D3DTEXF_NONE);
if (FAILED(hr))
{
msg_Warn(tc->gl, "IDirect3DDevice9Ex_StretchRect failed");
@@ -2160,8 +2166,8 @@ GLConvOpen(vlc_object_t *obj)
HRESULT hr;
HANDLE shared_handle = NULL;
hr = IDirect3DDevice9Ex_CreateRenderTarget(priv->d3dctx.devex,
- tc->fmt.i_width,
- tc->fmt.i_height,
+ tc->fmt.i_visible_width,
+ tc->fmt.i_visible_height,
D3DFMT_X8R8G8B8,
D3DMULTISAMPLE_NONE, 0, FALSE,
&priv->dx_render, &shared_handle);
More information about the vlc-commits
mailing list