[MPlayer-dev-eng] [PATCH] kva: support -geometry option
KO Myung-Hun
komh78 at gmail.com
Wed Mar 10 13:28:01 EET 2021
Hi/2.
If no objections, I'll commit soon.
KO Myung-Hun wrote:
> ---
> libvo/vo_kva.c | 22 ++++++++++++++++------
> 1 file changed, 16 insertions(+), 6 deletions(-)
>
> diff --git a/libvo/vo_kva.c b/libvo/vo_kva.c
> index 04333c64f..42b273dd7 100644
> --- a/libvo/vo_kva.c
> +++ b/libvo/vo_kva.c
> @@ -812,12 +812,21 @@ static int config(uint32_t width, uint32_t height,
> d_height++;
> }
>
> - m_int.rclDst.xLeft = ((LONG)vo_screenwidth - (LONG)d_width) / 2;
> - m_int.rclDst.yBottom = ((LONG)vo_screenheight - (LONG)d_height) / 2;
> + vo_dx = (vo_screenwidth - d_width) / 2;
> + vo_dy = (vo_screenheight - d_height ) / 2;
> + geometry(&vo_dx, &vo_dy, &d_width, &d_height,
> + vo_screenwidth, vo_screenheight);
> +
> + m_int.rclDst.xLeft = vo_dx;
> + // invert Y
> + m_int.rclDst.yBottom = vo_screenheight - (vo_dy + d_height);
> m_int.rclDst.xRight = m_int.rclDst.xLeft + d_width;
> m_int.rclDst.yTop = m_int.rclDst.yBottom + d_height;
>
> if (vo_fs) {
> + vo_dx = 0;
> + vo_dy = 0;
> +
> d_width = vo_screenwidth;
> d_height = vo_screenheight;
>
> @@ -831,10 +840,11 @@ static int config(uint32_t width, uint32_t height,
> setAspectRatio(KVAR_FORCEANY);
> }
>
> - rcl.xLeft = ((LONG)vo_screenwidth - (LONG)d_width) / 2;
> - rcl.yBottom = ((LONG)vo_screenheight - (LONG)d_height) /2 ;
> - rcl.xRight = rcl.xLeft + d_width;
> - rcl.yTop = rcl.yBottom + d_height;
> + rcl.xLeft = vo_dx;
> + // invert Y
> + rcl.yBottom = vo_screenheight - (vo_dy + d_height);
> + rcl.xRight = rcl.xLeft + d_width;
> + rcl.yTop = rcl.yBottom + d_height;
> } else {
> vo_fs = 0;
>
--
KO Myung-Hun
Using Mozilla SeaMonkey 2.7.2
Under OS/2 Warp 4 for Korean with FixPak #15
In VirtualBox v6.1.10 on Intel Core i7-3615QM 2.30GHz with 8GB RAM
Korean OS/2 User Community : http://www.os2.kr/
More information about the MPlayer-dev-eng
mailing list