diff options
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) { |