diff options
author | Uoti Urpala <uau@glyph.nonexistent.invalid> | 2009-01-15 05:07:09 +0200 |
---|---|---|
committer | Uoti Urpala <uau@glyph.nonexistent.invalid> | 2009-01-15 05:57:31 +0200 |
commit | 9bcd12fdf5c6f85e9bb391caa2713021624a957e (patch) | |
tree | 375eac533ead90a45e7121e5ab307861b4ef52c8 /libvo/x11_common.c | |
parent | d419ecd161634e79dab3ac57d57c4bccba2adcdc (diff) | |
parent | e0d66b140e1da7a793bff15003cadab79544b1dd (diff) | |
download | mpv-9bcd12fdf5c6f85e9bb391caa2713021624a957e.tar.bz2 mpv-9bcd12fdf5c6f85e9bb391caa2713021624a957e.tar.xz |
Merge svn changes up to r28310
The libdvdread4 and libdvdnav directories, which are externals in the
svn repository, are at least for now not included in any form. I added
configure checks to automatically disable internal libdvdread and
libdvdnav if the corresponding directories are not present; if they're
added manually then things work the same as in svn.
Diffstat (limited to 'libvo/x11_common.c')
-rw-r--r-- | libvo/x11_common.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/libvo/x11_common.c b/libvo/x11_common.c index 2c9677c997..7939adabac 100644 --- a/libvo/x11_common.c +++ b/libvo/x11_common.c @@ -9,6 +9,7 @@ #include "options.h" #include "mp_msg.h" #include "mp_fifo.h" +#include "libavutil/common.h" #include "x11_common.h" #include "talloc.h" @@ -1850,6 +1851,24 @@ uint32_t vo_x11_get_equalizer(char *name, int *value) return VO_TRUE; } +void vo_calc_drwXY(struct vo *vo, uint32_t *drwX, uint32_t *drwY) +{ + struct MPOpts *opts = vo->opts; + *drwX = *drwY = 0; + if (vo_fs) { + aspect(vo, &vo->dwidth, &vo->dheight, A_ZOOM); + vo->dwidth = FFMIN(vo->dwidth, opts->vo_screenwidth); + vo->dheight = FFMIN(vo->dheight, opts->vo_screenheight); + *drwX = (opts->vo_screenwidth - vo->dwidth) / 2; + *drwY = (opts->vo_screenheight - vo->dheight) / 2; + mp_msg(MSGT_VO, MSGL_V, "[xv-fs] dx: %d dy: %d dw: %d dh: %d\n", *drwX, + *drwY, vo->dwidth, vo->dheight); + } else if (WinID == 0) { + *drwX = vo->dx; + *drwY = vo->dy; + } +} + #ifdef CONFIG_XV int vo_xv_set_eq(struct vo *vo, uint32_t xv_port, char *name, int value) { |