summaryrefslogtreecommitdiffstats
path: root/libvo/vo_direct3d.c
diff options
context:
space:
mode:
authorUoti Urpala <uau@glyph.nonexistent.invalid>2009-02-18 01:07:37 +0200
committerUoti Urpala <uau@glyph.nonexistent.invalid>2009-02-18 01:45:36 +0200
commit186e5a998c8424b3c850b62d6f5755a0928cd64c (patch)
treecabc9881fb5ed2c6dbe5f771323a55c50136a091 /libvo/vo_direct3d.c
parent41ac08d2b45f0f6eb369ea57604796be69200185 (diff)
parente5ee1232c5e00e730d69cf57767b1ee3ab5b4e16 (diff)
downloadmpv-186e5a998c8424b3c850b62d6f5755a0928cd64c.tar.bz2
mpv-186e5a998c8424b3c850b62d6f5755a0928cd64c.tar.xz
Merge svn changes up to r28641
Convert vo_x11_border (used in vo_gl/gl2 though the vo_gl_border macro) to use a wrapper macro in old-style VOs which do not provide a VO object argument. Before this function had an explicit global_vo argument in vo_gl/gl2. New vo_vdpau uses it too so use the same mechanism as most other functions.
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 ef1d0ba9dc..c0f79d45d4 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)
{