[vlc-devel] [PATCH] direct3d9: only stretch the visible area to fill the displayed texture
Steve Lhomme
robux4 at videolabs.io
Mon Apr 20 14:16:55 CEST 2015
---
modules/video_output/msw/direct3d9.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/modules/video_output/msw/direct3d9.c b/modules/video_output/msw/direct3d9.c
index 93f2e07..db96275 100644
--- a/modules/video_output/msw/direct3d9.c
+++ b/modules/video_output/msw/direct3d9.c
@@ -1481,7 +1481,12 @@ static int Direct3D9ImportPicture(vout_display_t *vd,
/* Copy picture surface into texture surface
* color space conversion happen here */
- hr = IDirect3DDevice9_StretchRect(sys->d3ddev, source, NULL, destination, NULL, D3DTEXF_LINEAR);
+ RECT cropSource;
+ cropSource.left = 0;
+ cropSource.top = 0;
+ cropSource.right = vd->fmt.i_visible_width;
+ cropSource.bottom = vd->fmt.i_visible_height;
+ hr = IDirect3DDevice9_StretchRect(sys->d3ddev, source, &cropSource, destination, NULL, D3DTEXF_LINEAR);
IDirect3DSurface9_Release(destination);
if (FAILED(hr)) {
msg_Dbg(vd, "Failed IDirect3DDevice9_StretchRect: source 0x%p 0x%0lx", source, hr);
--
2.3.0
More information about the vlc-devel
mailing list