Commit 023a8a58 authored by Steve Lhomme's avatar Steve Lhomme Committed by Jean-Baptiste Kempf

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

Signed-off-by: Jean-Baptiste Kempf's avatarJean-Baptiste Kempf <>
parent 9c480555
......@@ -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; = 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);
if (FAILED(hr)) {
msg_Dbg(vd, "Failed IDirect3DDevice9_StretchRect: source 0x%p 0x%0lx", source, hr);
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment