summaryrefslogtreecommitdiffstats
path: root/libvo/vo_direct3d.c
diff options
context:
space:
mode:
authorreimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2>2009-02-17 11:59:49 +0000
committerreimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2>2009-02-17 11:59:49 +0000
commit01ef7e45790e1f0dd2277f73c583c9a503b2b6bd (patch)
treee513cf8669a9f80b1a9e77fe4e41b449d6f5a1ac /libvo/vo_direct3d.c
parenta845504a5ee6fd7e545f028cf84e1e503da574c1 (diff)
downloadmpv-01ef7e45790e1f0dd2277f73c583c9a503b2b6bd.tar.bz2
mpv-01ef7e45790e1f0dd2277f73c583c9a503b2b6bd.tar.xz
Extend calc_src_dst_rects to also calculate the border values needed for
correctly placed dvdnav highlights, and fix direct3d and vdpau accordingly. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@28633 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libvo/vo_direct3d.c')
-rw-r--r--libvo/vo_direct3d.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/libvo/vo_direct3d.c b/libvo/vo_direct3d.c
index c2955f2d44..bfeb82e562 100644
--- a/libvo/vo_direct3d.c
+++ b/libvo/vo_direct3d.c
@@ -63,6 +63,8 @@ static struct global_priv {
fullscreen */
int src_width; /**< Source (movie) width */
int src_height; /**< Source (movie) heigth */
+ int border_x; /**< horizontal border value for OSD */
+ int border_y; /**< vertical border value for OSD */
D3DFORMAT movie_src_fmt; /**< Movie colorspace format (depends on
the movie's codec) */
@@ -149,7 +151,8 @@ static void calc_fs_rect(void)
{
struct vo_rect src_rect;
struct vo_rect dst_rect;
- calc_src_dst_rects(priv->src_width, priv->src_height, &src_rect, &dst_rect, NULL);
+ struct vo_rect borders;
+ calc_src_dst_rects(priv->src_width, priv->src_height, &src_rect, &dst_rect, &borders, NULL);
priv->fs_movie_rect.left = dst_rect.left;
priv->fs_movie_rect.right = dst_rect.right;
@@ -159,6 +162,8 @@ static void calc_fs_rect(void)
priv->fs_panscan_rect.right = src_rect.right;
priv->fs_panscan_rect.top = src_rect.top;
priv->fs_panscan_rect.bottom = src_rect.bottom;
+ priv->border_x = borders.left;
+ priv->border_y = borders.top;
mp_msg(MSGT_VO, MSGL_V,
"<vo_direct3d>Fullscreen movie rectangle: t: %ld, l: %ld, r: %ld, b:%ld\n",
@@ -1027,7 +1032,8 @@ static void draw_osd(void)
/* required for if subs are in the boarder region */
priv->is_clear_needed = 1;
- vo_draw_text(priv->osd_width, priv->osd_height, draw_alpha);
+ vo_draw_text_ext(priv->osd_width, priv->osd_height, priv->border_x, priv->border_y,
+ priv->border_x, priv->border_y, priv->src_width, priv->src_height, draw_alpha);
if (!priv->device_texture_sys)
{