[vlc-commits] glwin32: correct vertical alignment

Victorien Le Couviour--Tuffet git at videolan.org
Mon Aug 7 18:04:17 CEST 2017


vlc | branch: master | Victorien Le Couviour--Tuffet <victorien.lecouviour.tuffet at gmail.com> | Fri Aug  4 19:41:12 2017 +0200| [e8011ba7c74f8ba6f6a06012843a60b3eea965a8] | committer: Jean-Baptiste Kempf

glwin32: correct vertical alignment

Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=e8011ba7c74f8ba6f6a06012843a60b3eea965a8
---

 modules/video_output/win32/common.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/modules/video_output/win32/common.c b/modules/video_output/win32/common.c
index 3617f7a9dc..59e3411cb6 100644
--- a/modules/video_output/win32/common.c
+++ b/modules/video_output/win32/common.c
@@ -194,6 +194,14 @@ void UpdateRects(vout_display_t *vd,
     place_cfg.display.width = rect.right;
     place_cfg.display.height = rect.bottom;
 
+#if (defined(MODULE_NAME_IS_glwin32))
+    /* Reverse vertical alignment as the GL tex are Y inverted */
+    if (place_cfg.align.vertical == VOUT_DISPLAY_ALIGN_TOP)
+        place_cfg.align.vertical = VOUT_DISPLAY_ALIGN_BOTTOM;
+    else if (place_cfg.align.vertical == VOUT_DISPLAY_ALIGN_BOTTOM)
+        place_cfg.align.vertical = VOUT_DISPLAY_ALIGN_TOP;
+#endif
+
     vout_display_place_t place;
     vout_display_PlacePicture(&place, source, &place_cfg, false);
 



More information about the vlc-commits mailing list