[vlc-commits] direct3d9: only stretch the visible area to fill the displayed texture

Steve Lhomme git at videolan.org
Tue Apr 28 09:35:02 CEST 2015


vlc | branch: master | Steve Lhomme <robUx4 at videolabs.io> | Mon Apr 20 11:16:55 2015 +0000| [023a8a5861ac8361e3d18399878920857d33a60d] | committer: Jean-Baptiste Kempf

direct3d9: only stretch the visible area to fill the displayed texture

Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=023a8a5861ac8361e3d18399878920857d33a60d
---

 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);



More information about the vlc-commits mailing list