[vlc-devel] [PATCH 15/20] glwin32: flip the alignment once on Open

Alexandre Janniaux ajanni at videolabs.io
Tue Aug 25 10:44:38 CEST 2020


Hi,

Same problem as the other patch, we don't want to modify the
video output configuration, or else the mouse handling you're
trying to fix will just break too.

Regards,
--
Alexandre Janniaux
Videolabs

On Tue, Aug 25, 2020 at 09:30:03AM +0200, Steve Lhomme wrote:
> The value will not change after that.
> ---
>  modules/video_output/Makefile.am     |  3 ---
>  modules/video_output/win32/common.c  | 12 +-----------
>  modules/video_output/win32/glwin32.c |  6 ++++++
>  3 files changed, 7 insertions(+), 14 deletions(-)
>
> diff --git a/modules/video_output/Makefile.am b/modules/video_output/Makefile.am
> index 83fc2bf96ae..c42fdc474a6 100644
> --- a/modules/video_output/Makefile.am
> +++ b/modules/video_output/Makefile.am
> @@ -145,9 +145,6 @@ libglwin32_plugin_la_SOURCES = \
>  	video_output/win32/win32touch.c video_output/win32/win32touch.h
>  libwgl_plugin_la_SOURCES = video_output/win32/wgl.c
>
> -libglwin32_plugin_la_CPPFLAGS = $(AM_CPPFLAGS) \
> -	-DMODULE_NAME_IS_glwin32
> -
>  libglwin32_plugin_la_LIBADD = libchroma_copy.la -lopengl32 -lgdi32 $(LIBCOM) -luuid libvlc_opengl.la
>  libwgl_plugin_la_LIBADD = -lopengl32 -lgdi32 libvlc_opengl.la
>
> diff --git a/modules/video_output/win32/common.c b/modules/video_output/win32/common.c
> index 4a84c658370..e84a5498a1b 100644
> --- a/modules/video_output/win32/common.c
> +++ b/modules/video_output/win32/common.c
> @@ -96,18 +96,8 @@ int CommonWindowInit(vout_display_t *vd, display_win32_area_t *area,
>  void CommonPlacePicture(vout_display_t *vd, display_win32_area_t *area)
>  {
>      /* Update the window position and size */
> -    vout_display_cfg_t place_cfg = *vd->cfg;
> -
> -#if (defined(MODULE_NAME_IS_glwin32))
> -    /* Reverse vertical alignment as the GL tex are Y inverted */
> -    if (place_cfg.align.vertical == VLC_VIDEO_ALIGN_TOP)
> -        place_cfg.align.vertical = VLC_VIDEO_ALIGN_BOTTOM;
> -    else if (place_cfg.align.vertical == VLC_VIDEO_ALIGN_BOTTOM)
> -        place_cfg.align.vertical = VLC_VIDEO_ALIGN_TOP;
> -#endif
> -
>      vout_display_place_t before_place = area->place;
> -    vout_display_PlacePicture(&area->place, &vd->source, &place_cfg);
> +    vout_display_PlacePicture(&area->place, &vd->source, vd->cfg);
>
>      /* Signal the change in size/position */
>      if (!vout_display_PlaceEquals(&before_place, &area->place))
> diff --git a/modules/video_output/win32/glwin32.c b/modules/video_output/win32/glwin32.c
> index 83183c52608..cbb6eba826f 100644
> --- a/modules/video_output/win32/glwin32.c
> +++ b/modules/video_output/win32/glwin32.c
> @@ -119,6 +119,12 @@ static int Open(vout_display_t *vd, vout_display_cfg_t *cfg,
>      if (!sys)
>          return VLC_ENOMEM;
>
> +    /* Reverse vertical alignment as the GL tex are Y inverted */
> +    if (cfg->align.vertical == VLC_VIDEO_ALIGN_TOP)
> +        cfg->align.vertical = VLC_VIDEO_ALIGN_BOTTOM;
> +    else if (cfg->align.vertical == VLC_VIDEO_ALIGN_BOTTOM)
> +        cfg->align.vertical = VLC_VIDEO_ALIGN_TOP;
> +
>      /* */
>      CommonInit(&sys->area);
>      if (CommonWindowInit(vd, &sys->area, &sys->sys,
> --
> 2.26.2
>
> _______________________________________________
> vlc-devel mailing list
> To unsubscribe or modify your subscription options:
> https://mailman.videolan.org/listinfo/vlc-devel


More information about the vlc-devel mailing list