diff options
author | wm4 <wm4@nowhere> | 2015-05-21 19:27:54 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2015-05-21 19:27:54 +0200 |
commit | af667643a0a7939c2cdb0d5e1451f45e376a0449 (patch) | |
tree | 3cfa8189a153f1d8faf6062f49abe66d8a106afc /video/out/vo_direct3d.c | |
parent | cf023e1f3aeccc4e8b04edf5fc5fd2d9bd96e620 (diff) | |
download | mpv-af667643a0a7939c2cdb0d5e1451f45e376a0449.tar.bz2 mpv-af667643a0a7939c2cdb0d5e1451f45e376a0449.tar.xz |
video: do not align source position to 2
vo_direct3d still seems to require this (tested on Windows 8.1 with
Intel graphics). Do it in vo_direct3d instead of messing with all VOs.
Diffstat (limited to 'video/out/vo_direct3d.c')
-rw-r--r-- | video/out/vo_direct3d.c | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/video/out/vo_direct3d.c b/video/out/vo_direct3d.c index 54a92699e7..e3b366b5ca 100644 --- a/video/out/vo_direct3d.c +++ b/video/out/vo_direct3d.c @@ -887,6 +887,9 @@ static uint32_t d3d_draw_frame(d3d_priv *priv) if (!priv->have_image) goto render_osd; + RECT rm = priv->fs_movie_rect; + RECT rs = priv->fs_panscan_rect; + if (priv->use_textures) { for (n = 0; n < priv->plane_count; n++) { @@ -894,9 +897,6 @@ static uint32_t d3d_draw_frame(d3d_priv *priv) d3dtex_get_render_texture(priv, &priv->planes[n].texture)); } - RECT rm = priv->fs_movie_rect; - RECT rs = priv->fs_panscan_rect; - vertex_video vb[] = { { rm.left, rm.top, 0.0f}, { rm.right, rm.top, 0.0f}, @@ -941,11 +941,15 @@ static uint32_t d3d_draw_frame(d3d_priv *priv) } } else { + rs.left &= ~(ULONG)1; + rs.top &= ~(ULONG)1; + rs.right &= ~(ULONG)1; + rs.bottom &= ~(ULONG)1; if (FAILED(IDirect3DDevice9_StretchRect(priv->d3d_device, priv->d3d_surface, - &priv->fs_panscan_rect, + &rs, priv->d3d_backbuf, - &priv->fs_movie_rect, + &rm, D3DTEXF_LINEAR))) { MP_ERR(priv, "Copying frame to the backbuffer failed.\n"); return VO_ERROR; |